AddOrUpdateChoices(Int32,String,String,Int32,Nullable<Boolean>,StepChoice[]) Method
- Last UpdatedNov 06, 2025
- 2 minute read
The AddOrUpdateChoices() method adds or updates operation step choice records in the Oper_Step_Choice table.
This overthrow of the method adds or updates one or more operation step choice records.
'Declaration
Public Overloads Shared Sub AddOrUpdateChoices( _
ByVal sessionId As Integer, _
ByVal processId As String, _
ByVal operId As String, _
ByVal stepNo As Integer, _
ByVal deleteAll As Nullable(Of Boolean), _
ByVal stepChoiceList() As StepChoice _
)
'Usage
Dim sessionId As Integer
Dim processId As String
Dim operId As String
Dim stepNo As Integer
Dim deleteAll As Nullable(Of Boolean)
Dim stepChoiceList() As StepChoice
OperStepChoice.AddOrUpdateChoices(sessionId, processId, operId, stepNo, deleteAll, stepChoiceList)
public static void AddOrUpdateChoices(
int sessionId,
string processId,
string operId,
int stepNo,
Nullable<bool> deleteAll,
StepChoice[] stepChoiceList
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- processId
- Required. Holds the ID of the process to which the operation belongs.
- operId
- Required. Holds the ID of the operation to which the step belongs.
- stepNo
- Required. Holds the operation step number.
- deleteAll
Optional. Holds a flag that, if set to true, specifies that any operation step choice records that match the supplied processId, operId, stepNo, and choiceNo values be deleted from the Oper_Step_Choice table. This clears the specified choice records from the table before adding the new choice records.
- stepChoiceList
- Required. Holds an array of StepChoice objects, each containing the fields needed to create or update one step choice. Refer to the Remarks for more information.
Each element in the stepChoiceList array is an instance of the StepChoice class. The fields in this class are shown in the following table:
|
Field Name |
Description |
|---|---|
|
choiceNo |
Required. An integer that is the step choice number. |
|
choiceLabel |
Optional. A string that is the step choice label, which indicates the step choice type. |
This method adds or updates the row in the Oper_Step_Choice table for each element in the stepChoiceList. If the choiceLabel is not supplied, the row identified by the choiceNo will be removed from the Oper_Step_Choice table. If the choiceLabel is supplied and a row identified by the stepNo exists in the Oper_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 Oper_Step_Choice table, a new row for the choiceNo and choiceLabel is created.