SetLaborData Method
- Last UpdatedNov 06, 2025
- 3 minute read
The SetLaborData() method changes the current labor code, department ID, and/or percentage labor to apply to a specified active labor collection event for the specified entity.
'Declaration
Public Shared Sub SetLaborData( _
ByVal sessionId As Integer, _
ByVal userId As String, _
ByVal entId As Integer, _
ByVal stepNo As DBInt, _
ByVal lotNo As DBString, _
ByVal subLotNo As DBString, _
ByVal labCd As String, _
ByVal deptId As String, _
ByVal pctToApply As Nullable(Of Double), _
ByVal comments As DBString, _
ByVal woId As DBString, _
ByVal operId As DBString, _
ByVal seqNo As DBInt, _
ByVal rawReasCd As DBString _
)
'Usage
Dim sessionId As Integer
Dim userId As String
Dim entId As Integer
Dim stepNo As DBInt
Dim lotNo As DBString
Dim subLotNo As DBString
Dim labCd As String
Dim deptId As String
Dim pctToApply As Nullable(Of Double)
Dim comments As DBString
Dim woId As DBString
Dim operId As DBString
Dim seqNo As DBInt
Dim rawReasCd As DBString
LaborExec.SetLaborData(sessionId, userId, entId, stepNo, lotNo, subLotNo, labCd, deptId, pctToApply, comments, woId, operId, seqNo, rawReasCd)
public static void SetLaborData(
int sessionId,
string userId,
int entId,
DBInt stepNo,
DBString lotNo,
DBString subLotNo,
string labCd,
string deptId,
Nullable<double> pctToApply,
DBString comments,
DBString woId,
DBString operId,
DBInt seqNo,
DBString rawReasCd
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- userId
- Required. Holds the ID of the user.
- entId
- Required. Holds the ID of the entity.
- stepNo
- Optional. Holds the job step number on which the labor was performed.
- lotNo
- Optional. Holds the number of the lot on which the labor was performed.
- subLotNo
- Optional. Holds the number of the sublot on which the labor was performed.
- labCd
- Optional. Holds the labor code to be applied for this duration.
- deptId
- Optional. Holds the department ID to be applied for this duration.
- pctToApply
- Optional. Holds the percentage split of labor to be applied this duration.
- comments
- Optional. Holds comments about this labor transaction.
- woId
- Optional. Holds the ID of the work order on which the labor was performed.
- operId
- Optional. Holds the ID of the operation on which the labor was performed.
- seqNo
- Optional. Holds the operation sequence number on which the labor was performed.
- rawReasCd
- Optional. Holds the raw reason code to be applied for this labor transaction.
This method changes the labor code, department ID, and/or percentage for the active labor usage record to which the user is currently logged on. This method closes off any existing active rows in the Labor_Usage table that satisfies the filter criteria, and then creates new labor events for them with the new values. The optional parameters are included as filters to select which rows are affected if they are included; otherwise, they are not used to filter the active rows that are updated.
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Optional non-DB* parameters: Either enter a value or pass a null. If passing a null and a default value has been defined, the default value will be used for the parameter.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null).
- Optional DB* parameters: To enter no value for the parameter, pass DB*.null (e.g., DBInt.null). To use the default value for the parameter if one has been defined for the object being added, pass a null.