GetAll Method (UtilLog)
- Last UpdatedNov 06, 2025
- 5 minute read
The GetAll() method is maintained for compatibility with MES versions prior to 6.0. For new projects, this method should not be used. Instead, use the GetAll() method in the UtilHistory class.
The GetAll() method retrieves one or more utilization history records from the Util_Log view, as specified by the filter parameters. Passing no filter parameters will retrieve all utilization history records from the table.
'Declaration
Public Shared Function GetAll( _
ByVal logId As Nullable(Of Integer), _
ByVal eventTime As Nullable(Of Date), _
ByVal entId As Nullable(Of Integer), _
ByVal shiftId As Nullable(Of Integer), _
ByVal shiftStart As Nullable(Of Date), _
ByVal stateCode As Nullable(Of Integer), _
ByVal reasonCode As Nullable(Of Integer), _
ByVal rawReasonCode As String, _
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 lastEditBy As String, _
ByVal lastEditAt As Nullable(Of Date) _
) As DataSet
'Usage
Dim logId As Nullable(Of Integer)
Dim eventTime As Nullable(Of Date)
Dim entId As Nullable(Of Integer)
Dim shiftId As Nullable(Of Integer)
Dim shiftStart As Nullable(Of Date)
Dim stateCode As Nullable(Of Integer)
Dim reasonCode As Nullable(Of Integer)
Dim rawReasonCode As String
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 lastEditBy As String
Dim lastEditAt As Nullable(Of Date)
Dim value As DataSet
value = UtilLog.GetAll(logId, eventTime, entId, shiftId, shiftStart, stateCode, reasonCode, rawReasonCode, reasonPending, runtime, downtime, setuptime, teardownTime, fixedtime, variableTime, failure, lastEditBy, lastEditAt)
public static DataSet GetAll(
Nullable<int> logId,
Nullable<DateTime> eventTime,
Nullable<int> entId,
Nullable<int> shiftId,
Nullable<DateTime> shiftStart,
Nullable<int> stateCode,
Nullable<int> reasonCode,
string rawReasonCode,
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 lastEditBy,
Nullable<DateTime> lastEditAt
)
Parameters
- logId
- Optional filter parameter. Holds the ID of the event history record.
- eventTime
- Optional filter parameter. Holds the start of the event time local to the client making the request.
- entId
- Optional filter parameter. Holds the ID of the entity whose utilization history records are being retrieved.
- shiftId
- Optional filter parameter. Holds the ID of the shift during which the event was recorded.
- shiftStart
- Optional filter parameter. Holds the start of the shift in the local time of the client that is making the request.
- stateCode
- Optional filter parameter. Holds the code for the utilization state associated with the event.
- reasonCode
- Optional filter parameter. Holds the code for the reason associated with the event.
- rawReasonCode
- Optional filter parameter. Holds the raw reason code that generated the event.
- reasonPending
- Optional filter parameter. Holds a flag indicating whether or not the reason 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 teardown 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.
- lastEditBy
- Optional filter parameter. Holds a user who added or last changed a utilization history record.
- lastEditAt
- Optional filter parameter. Holds the date/time when a utilization history record was added or last edited.
Return Value
Returns a DataSet that contains the records in the Util_History table that match the specified filters. If no matching records are found, an empty DataSet is returned.
The columns of the returned DataSet are described below.
|
Column Name |
Description |
|---|---|
|
log_id |
An integer that is the ID of the event history record. |
|
event_time_utc |
A date/time that is the start time for the event, in UTC. |
|
event_time_local |
A date/time that is the start time for the event, in the local time of the entity. |
|
event_time |
A date/time that is the start time for the event, in the local time of the client application that is making the call. |
|
ent_id |
The ID for the entity for which the event was recorded. |
|
ent_name |
The name of the entity for which the event was recorded. |
|
shift_id |
The ID of the shift during which the event was recorded. A value of 0 will be returned if there is no shift associated with this record. |
|
shift_desc |
The description of the shift during which the event was recorded. |
|
shift_start_utc |
The date/time for the start of the shift during which the event was recorded, in UTC. Will have a value of 1/1/1900 if there is no shift associated with the record. |
|
shift_start_local |
The date/time for the start of the shift during which the event was recorded, in the local time of the entity. Will have a value of 1/1/1900 if there is no shift associated with the record. |
|
shift_start |
The date/time for the start of the shift during which the event was recorded, in the local time of the client application that is making the call. Will have a value of 1/1/1900 if there is no shift associated with the record. |
|
state_cd |
The code for the utilization state of the entity for the recorded event. |
|
state_desc |
The description of the utiltization state of the entity for the recorded event. |
|
color |
The RGB color value associated with the utilization state. |
|
reas_cd |
The code for the utilization reason for the event. |
|
reas_desc |
The description of the utilization reason for the event. |
|
reas_pending |
A flag indicating whether or not the reason must be finalized. |
|
runtime |
A flag indicating whether or not the event counts as runtime. |
|
downtime |
A flag indicating whether or not the event counts as downtime. |
|
setuptime |
A flag indicating whether or not the event counts as setup time. |
|
teardowntime |
A flag indicating whether or not the event counts as teardown time. |
|
fixedtime |
A flag indicating whether or not the event counts as fixed time. |
|
vartime |
A flag indicating whether or not the event counts as variable time. |
|
failure |
A flag indicating whether or not the event counts as a failure. |
|
duration |
A string indicating how long, in hours, minutes, and seconds, the event lasted. |
|
comments |
A string holding the notes about the event. |
|
raw_reas_cd |
A string holding 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 is the content of the user-defined spare1 field. |
|
spare2 |
A string that is the content of the user-defined spare2 field. |
|
spare3 |
A string that is the content of the user-defined spare3 field. |
|
spare4 |
A string that is the content of the user-defined spare4 field. |
|
category1 |
A string that is the content of the category1 field. |
|
category2 |
A string that is the content of the category2 field. |
|
category3 |
A string that is the content of the category3 field. |
|
category4 |
A string that is the content of the 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 last edited this record is returned. |
|
last_edit_at |
A datetime that is the date/time that the record was created or last modified. |