GetUtilByFilter Method
- Last UpdatedNov 06, 2025
- 3 minute read
The GetUtilByFilter() method retrieves the utilization data from the Util_Log table using the supplied data filters.
'Declaration
Public Function GetUtilByFilter( _
ByVal shiftId As Nullable(Of Long), _
ByVal shiftStartStart As String, _
ByVal shiftStartEnd As String, _
ByVal eventTimeStart As String, _
ByVal eventTimeEnd As String, _
ByVal minDuration As Nullable(Of Long), _
ByVal maxDuration As Nullable(Of Long), _
ByVal reasCd As Nullable(Of Long), _
ByVal stateCd As Nullable(Of Long), _
ByVal reasPending As Nullable(Of Long), _
ByVal runtime As Nullable(Of Long), _
ByVal downtime As Nullable(Of Long), _
ByVal setupTime As Nullable(Of Long), _
ByVal tearDownTime As Nullable(Of Long), _
ByVal timeCategoryNone As Nullable(Of Long), _
ByVal fixedTime As Nullable(Of Long), _
ByVal varTime As Nullable(Of Long), _
ByVal timeTypeNeither As Nullable(Of Long), _
ByVal comment As String, _
ByVal rawReasCd As String, _
ByVal timeFilterType As Nullable(Of Long), _
ByVal lastNValue As Nullable(Of Long) _
) As DataSet
public DataSet GetUtilByFilter(
Nullable<long> shiftId,
string shiftStartStart,
string shiftStartEnd,
string eventTimeStart,
string eventTimeEnd,
Nullable<long> minDuration,
Nullable<long> maxDuration,
Nullable<long> reasCd,
Nullable<long> stateCd,
Nullable<long> reasPending,
Nullable<long> runtime,
Nullable<long> downtime,
Nullable<long> setupTime,
Nullable<long> tearDownTime,
Nullable<long> timeCategoryNone,
Nullable<long> fixedTime,
Nullable<long> varTime,
Nullable<long> timeTypeNeither,
string comment,
string rawReasCd,
Nullable<long> timeFilterType,
Nullable<long> lastNValue
)
Parameters
- shiftId
Optional. Holds the ID of the shift to filter the utilization data that is being retrieved.
- shiftStartStart
Optional. Holds the shift start time on the entity to filter the utilization data that is being retrieved.
- shiftStartEnd
Optional. Holds the shift end time for the entity to filter the utilization data that is being retrieved.
- eventTimeStart
Optional. Holds the event start time for the entity to filter the utilization data that is being retrieved.
- eventTimeEnd
Optional. Holds the event end time for the entity to filter the utilization data that is being retrieved.
- minDuration
Optional. Holds the minimum amount of time spent in the event to filter the utilization data that is being retrieved.
- maxDuration
Optional. Holds the maximum amount of time spent in the event to filter the utilization data that is being retrieved.
- reasCd
Optional. Holds a utilization reason code to filter the utilization data that is being retrieved.
- stateCd
Optional. Holds a utilization state code to filter the utilization data that is being retrieved.
- reasPending
Optional. Holds a value indicating which types of events should be returned:
0=Unacknowledged
1=Acknowledged
- runtime
Optional. Holds a value indicating whether the DataSet should be filtered by runtime events (acts as a boolean).
- downtime
Optional. Holds a value indicating whether the DataSet should be filtered by downtime events (acts as a boolean).
- setupTime
Optional. Holds a value indicating whether the DataSet should be filtered by setup time events (acts as a boolean).
- tearDownTime
Optional. Holds a value indicating whether the DataSet should be filtered by teardown time events (acts as a boolean).
- timeCategoryNone
Optional. Holds a value indicating whether the DataSet should be filtered by any time categories (that is, runtime, downtime, setuptime, and teardowntime). If true, then the DataSet is filtered by runtime=0, downtime=0, setuptime=0, and teardowntime=0 events.
- fixedTime
Optional. Holds a value indicating whether the DataSet should be filtered by fixed time events (acts as a boolean).
- varTime
Optional. Holds a value indicating whether the DataSet should be filtered by variable time events (acts as a boolean).
- timeTypeNeither
Optional. Holds a value indicating whether the DataSet should not be filtered by variable and fixed time events (acts as a boolean).
- comment
Optional. Holds comments to filter the utilization data that is being retrieved.
- rawReasCd
Optional. Holds a raw reason code to filter the utilization data that is being retrieved. This string should be an integer.
- timeFilterType
Optional. Holds a value that indicates the type of time-based filtering being performed:
0 = LastNEvents
1=Current Shift
2=Last Shift
3=This Hour
4=LastNHours
5=CurrentDay
6=Yesterday
7=Current Week
8=Last Week
9=Current Month
10=Last Month
11=Custom
12=No time-based filtering
- lastNValue
Optional. Holds a value that indicates how many of the most recent utilization events to return. Required if timeFilterType = 0; otherwise, the value of this parameter is ignored.
Return Value
Returns a DataSet containing utilization data filtered by the filters that were specified.