GetAll Method (UtilHistory)
- Last UpdatedNov 06, 2025
- 5 minute read
The GetAll() method retrieves one or more utilization history records from the Util_History table, as specified by the filter parameters. Passing no filter parameters will retrieve all entity records from the table.
'Declaration
Public Shared Function GetAll( _
ByVal entityId As Nullable(Of Integer), _
ByVal eventTimeUtc As Nullable(Of Date), _
ByVal shiftId As Nullable(Of Integer), _
ByVal shiftStartUtc As Nullable(Of Date), _
ByVal stateCode As Nullable(Of Integer), _
ByVal reasonCode As Nullable(Of Integer), _
ByVal reasonPending As Nullable(Of Boolean), _
ByVal runtime As Nullable(Of Boolean), _
ByVal downtime As Nullable(Of Boolean), _
ByVal setupTime As Nullable(Of Boolean), _
ByVal tearDowntime As Nullable(Of Boolean), _
ByVal fixedTime As Nullable(Of Boolean), _
ByVal variableTime As Nullable(Of Boolean), _
ByVal failure As Nullable(Of Boolean), _
ByVal rawReasonCode As String, _
ByVal lastEditBy As String, _
ByVal lastEditAt As Nullable(Of Date) _
) As DataSet
'Usage
Dim entityId As Nullable(Of Integer)
Dim eventTimeUtc As Nullable(Of Date)
Dim shiftId As Nullable(Of Integer)
Dim shiftStartUtc As Nullable(Of Date)
Dim stateCode As Nullable(Of Integer)
Dim reasonCode As Nullable(Of Integer)
Dim reasonPending As Nullable(Of Boolean)
Dim runtime As Nullable(Of Boolean)
Dim downtime As Nullable(Of Boolean)
Dim setupTime As Nullable(Of Boolean)
Dim tearDowntime As Nullable(Of Boolean)
Dim fixedTime As Nullable(Of Boolean)
Dim variableTime As Nullable(Of Boolean)
Dim failure As Nullable(Of Boolean)
Dim rawReasonCode As String
Dim lastEditBy As String
Dim lastEditAt As Nullable(Of Date)
Dim value As DataSet
value = UtilHistory.GetAll(entityId, eventTimeUtc, shiftId, shiftStartUtc, stateCode, reasonCode, reasonPending, runtime, downtime, setupTime, tearDowntime, fixedTime, variableTime, failure, rawReasonCode, lastEditBy, lastEditAt)
public static DataSet GetAll(
Nullable<int> entityId,
Nullable<DateTime> eventTimeUtc,
Nullable<int> shiftId,
Nullable<DateTime> shiftStartUtc,
Nullable<int> stateCode,
Nullable<int> reasonCode,
Nullable<bool> reasonPending,
Nullable<bool> runtime,
Nullable<bool> downtime,
Nullable<bool> setupTime,
Nullable<bool> tearDowntime,
Nullable<bool> fixedTime,
Nullable<bool> variableTime,
Nullable<bool> failure,
string rawReasonCode,
string lastEditBy,
Nullable<DateTime> lastEditAt
)
Parameters
- entityId
- Optional filter parameter. Holds the ID of the entity whose utilization history records are being retrieved.
- eventTimeUtc
- Optional filter parameter. Holds the start of the event time in UTC.
- shiftId
- Optional filter parameter. Holds the ID of the shift during which the event was recorded.
- shiftStartUtc
- Optional filter parameter. Holds the date/time when the shift started, in UTC.
- stateCode
- Optional filter parameter. Holds the state code for the utilization reason.
- reasonCode
- Optional filter parameter. Holds the code for the utilization reason.
- reasonPending
- Optional filter parameter. Holds a flag that indicates whether or not the reason is pending and needs to be finalized.
- runtime
- Optional filter parameter. Holds a flag indicating whether or not the reason counts to runtime.
- downtime
- Optional filter parameter. Holds a flag indicating whether or not the reason counts to downtime.
- setupTime
- Optional filter parameter. Holds a flag indicating whether or not the reason counts to setup time.
- tearDowntime
- Optional filter parameter. Holds a flag indicating whether or not the reason counts to tear down time.
- fixedTime
- Optional filter parameter. Holds a flag indicating whether or not the reason counts to fixed time.
- variableTime
- Optional filter parameter. Holds a flag indicating whether or not the reason counts to variable time.
- failure
- Optional filter parameter. Holds a flag indicating whether or not the reason counts as a failure.
- rawReasonCode
- Optional filter parameter. Holds the name of a utilization raw reason code whose record is being retrieved.
- lastEditBy
- Optional filter parameter. Holds the name of a user who added or last changed a record.
- lastEditAt
- Optional filter parameter. Holds a date/time of when a record was added or last changed.
Return Value
Returns a DataSet that contains a DataRow for each utilization history record that satisfies the specified filter criteria from the Util_History table. If no matching record is found, an empty DataSet is returned.
The columns of the returned DataSet are described below.
|
Column Name |
Description |
|---|---|
|
event_time_utc |
A datetime that is the start time, in UTC, of the event. |
|
event_time_local |
A datetime that is the start time, in the local time of the entity, of the event. |
|
ent_id |
An integer that is the ID of the entity for which the event was recorded. |
|
ent_name |
A string that is the name of the entity for which the event was recorded. |
|
shift_id |
An integer that is the ID of the shift during which the event was recorded. |
|
shift_desc |
A string that is the description of the shift during which the event was recorded. |
|
shift_start_utc |
A datetime that is the start time, in UTC, of the shift during which the event was recorded. Will have a value of 1/1/1900 if there is no shift associated with the record. |
|
shift_start_local |
A datetime that is the start time, in the local time of the entity, of the shift during which the event was recorded. Will have a value of 1/1/1900 if there is no shift associated with the record. |
|
state_cd |
An integer that is the code for the utilization state of the entity for the recorded event. |
|
state_desc |
A string that is the description of the utilization state of the entity for the recorded event. |
|
color |
An integer that is the RGB color value associated with the utilization state. |
|
reas_cd |
An integer that is the code for the utilization reason for the event. |
|
reas_pending |
A Boolean that is a flag that indicates whether or not the reason must be finalized. |
|
runtime |
A Boolean that is a flag that indicates whether or not the event counts as runtime. |
|
downtime |
A Boolean that is a flag that indicates whether or not the event counts as downtime. |
|
setuptime |
A Boolean that is a flag that indicates whether or not the event counts as setup time. |
|
teardowntime |
A Boolean that is a flag that indicates whether or not the event counts as tear down time. |
|
fixedtime |
A Boolean that is a flag that indicates whether or not the event counts as fixed time. |
|
vartime |
A Boolean that is a flag that indicates whether or not the event counts as variable time. |
|
failure |
A Boolean that is a flag that indicates whether or not the event counts as a failure. |
|
duration |
A string, in the format HH:MM:SS, that indicates how long the event lasted. |
|
comments |
A string that contains the comments about the event. |
|
raw_reas_cd |
A string that is the code for the raw reason that generated the event or null if the event was not generated from a raw reason. |
|
spare1 |
A string that holds the content of the user-defined spare1 field. |
|
spare2 |
A string that holds the content of the user-defined spare2 field. |
|
spare3 |
A string that holds the content of the user-defined spare3 field. |
|
spare4 |
A string that holds the content of the user-defined spare4 field. |
|
category1 |
A string that holds the content of the user-defined category1 field. |
|
category2 |
A string that holds the content of the user-defined category2 field. |
|
category3 |
A string that holds the content of the user-defined category3 field. |
|
category4 |
A string that holds the content of the user-defined category4 field. |
|
last_edit_comment |
A string that contains comments about why the record was added or last changed. |
|
last_edit_by |
A string that is the user who added or last edited this record. |
|
last_edit_at |
A datetime that identifies when the record was added or last modified. |