UpdateSpecific Method (UtilState)
- Last UpdatedNov 06, 2025
- 5 minute read
The UpdateSpecific() method updates selected columns for the specified utilization state record in the Util_State table.
'Declaration
Public Shared Sub UpdateSpecific( _
ByVal sessionId As Integer, _
ByVal stateCd As Integer, _
ByVal stateDesc As String, _
ByVal color As Nullable(Of Integer), _
ByVal runtime As DBInt, _
ByVal downtime As DBInt, _
ByVal setuptime As DBInt, _
ByVal teardownTime As DBInt, _
ByVal fixedtime As DBInt, _
ByVal vartime As DBInt, _
ByVal failure As DBInt, _
ByVal defLabCode As DBString, _
ByVal priority As DBInt, _
ByVal maxDuration As DBInt, _
ByVal newReasonCode As DBInt, _
ByVal standardTime As DBDouble, _
ByVal minTime As DBDouble, _
ByVal maxTime As DBDouble, _
ByVal entityEnabled As DBInt, _
ByVal category1 As DBString, _
ByVal category2 As DBString, _
ByVal category3 As DBString, _
ByVal category4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim stateCd As Integer
Dim stateDesc As String
Dim color As Nullable(Of Integer)
Dim runtime As DBInt
Dim downtime As DBInt
Dim setuptime As DBInt
Dim teardownTime As DBInt
Dim fixedtime As DBInt
Dim vartime As DBInt
Dim failure As DBInt
Dim defLabCode As DBString
Dim priority As DBInt
Dim maxDuration As DBInt
Dim newReasonCode As DBInt
Dim standardTime As DBDouble
Dim minTime As DBDouble
Dim maxTime As DBDouble
Dim entityEnabled As DBInt
Dim category1 As DBString
Dim category2 As DBString
Dim category3 As DBString
Dim category4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Date
UtilState.UpdateSpecific(sessionId, stateCd, stateDesc, color, runtime, downtime, setuptime, teardownTime, fixedtime, vartime, failure, defLabCode, priority, maxDuration, newReasonCode, standardTime, minTime, maxTime, entityEnabled, category1, category2, category3, category4, lastEditComment, lastEditAt)
public static void UpdateSpecific(
int sessionId,
int stateCd,
string stateDesc,
Nullable<int> color,
DBInt runtime,
DBInt downtime,
DBInt setuptime,
DBInt teardownTime,
DBInt fixedtime,
DBInt vartime,
DBInt failure,
DBString defLabCode,
DBInt priority,
DBInt maxDuration,
DBInt newReasonCode,
DBDouble standardTime,
DBDouble minTime,
DBDouble maxTime,
DBInt entityEnabled,
DBString category1,
DBString category2,
DBString category3,
DBString category4,
DBString lastEditComment,
ref DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- stateCd
- Required. Holds the code that identifies the state that is being updated.
- stateDesc
- Required. Holds the unique description for the state.
- color
- Required. Holds an integer that indicates the state's RGB background color in the user interface.
- runtime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward runtime events.
- downtime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward downtime events.
- setuptime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward setup time events.
- teardownTime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward teardown time events.
- fixedtime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward fixed time events.
- vartime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward variable time events.
- failure
- Optional. Holds a flag that, if set to true, specifies that any time that the entity spends in the utilization reason code is considered failure time.
- defLabCode
- Optional. Holds the default labor code to be used for the utilization reason when it is manually selected.
- priority
- Optional. Holds the priority of the utilization reason, which is used to determine the reason for a line that has two or more bottleneck entities with differing reasons.
- maxDuration
Optional. Holds the maximum duration, in seconds, that is used with setting a Severe flag or with the newReasonCode parameter.
- If the newReasonCode parameter is not being used (that is, it is null) and the maximum duration is exceeded, the reason is marked as being Severe and the event is considered to be in a severe condition. The Severe flag is typically used with downtime events.
- If the newReasonCode parameter is being used and the maximum duration is exceeded, the utilization reason for the entity is changed to the new reason specified in the newReasonCode parameter.
- newReasonCode
- Optional. Holds the utilization reason to which this reason should change when the maximum duration is exceeded.
- standardTime
- Optional. Holds the standard amount of time, in minutes, that an entity is expected to be in this utilization reason.
- minTime
- Optional. Holds the minimum amount of time, in minutes, that an entity is expected to be in this utilization reason.
- maxTime
- Optional. Holds the maximum amount of time, in minutes, that an entity is expected to be in this utilization reason.
- entityEnabled
- Optional. Holds the flag that, if true, indicates that an entity in this utilization reason is considered to be enabled.
- category1
- Optional. Holds a user-defined field that describes a category.
- category2
- Optional. Holds a user-defined field that describes a category.
- category3
- Optional. Holds a user-defined field that describes a category.
- category4
- Optional. Holds a user-defined field that describes a category.
- lastEditComment
- Optional. Holds comments that describe why this record is being updated.
- lastEditAt
Optional input. Holds the date/time when this record was added or last edited, for optimistic concurrency control. If it is specified, the passed value must match the lastEditAt value in the record for the update to succeed.
Output. Holds the date/time value when the record was updated by this called method.
Observe the following input parameter rules:
- Optional non-DB* parameters: Either enter a new value or leave the existing value unchanged by passing a null.
- Optional DB* parameters: To clear the existing value and enter an empty value, pass DB*.null (e.g., DBInt.null). To leave the existing value unchanged, pass a null.
Each utilization reason is assigned a corresponding utilization state. In addition to the state's description and background color, the utilization state includes default settings that can be specified for the utilization reasons to which a utilization state is assigned. These default settings can then be applied in the user interface to the utilization reason. To not specify a default value for a utilization reason setting, pass a DBNull for that parameter.