AddOrUpdateChoices(Int32,String,String,Int32,Int32,Nullable<Boolean>,Int32,String) Method
- Last UpdatedNov 06, 2025
- 2 minute read
The AddOrUpdateChoices() method adds or updates job step choice records in the Job_Step_Choice table.
This overload of the method adds or updates only one job step choice record.
'Declaration
Public Overloads Shared Sub AddOrUpdateChoices( _
ByVal sessionId As Integer, _
ByVal woId As String, _
ByVal operId As String, _
ByVal seqNo As Integer, _
ByVal stepNo As Integer, _
ByVal deleteAll As Nullable(Of Boolean), _
ByVal choiceNo As Integer, _
ByVal choiceLabel As String _
)
'Usage
Dim sessionId As Integer
Dim woId As String
Dim operId As String
Dim seqNo As Integer
Dim stepNo As Integer
Dim deleteAll As Nullable(Of Boolean)
Dim choiceNo As Integer
Dim choiceLabel As String
JobStepChoice.AddOrUpdateChoices(sessionId, woId, operId, seqNo, stepNo, deleteAll, choiceNo, choiceLabel)
public static void AddOrUpdateChoices(
int sessionId,
string woId,
string operId,
int seqNo,
int stepNo,
Nullable<bool> deleteAll,
int choiceNo,
string choiceLabel
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- woId
- Required. Holds the ID of the work order associated with the job.
- operId
- Required. Holds the ID of the operation associated with the job.
- seqNo
- Required. Holds the sequence number of the operation to which the job step belongs.
- stepNo
- Required. Holds the job step number.
- deleteAll
- Optional. Holds a flag that, if set to true, specifies that any job step choice records that match the supplied woId, operId, seqNo, stepNo, and choicNo values be deleted from the Job_Step_Choice table. This clears the specified choice records from the table before adding the new choice records.
- choiceNo
- Required. Holds the choice number.
- choiceLabel
- Optional. Holds the choice label, which indicates the step choice type. Refer to the Remarks for more information.
This method adds or updates the row in the Job_Step_Choice table based on the supplied input parameter. If a choiceLabel is not supplied, the row identified by the choiceNo will be removed from the Job_Step_Choice table. If the choiceLabel is supplied and a row identified by the stepNo exists in the Job_Step_Choice table, the row is updated with the choiceLabel. If the choiceLabel is supplied and a row identified by the stepNo does not exist in the Job_Step_Choice table, a new row for the choiceNo and choiceLabel is created.