AddOrUpdateChoices(Int32,String,Int32,Nullable<Boolean>,StepChoice[]) Method
- Last UpdatedNov 06, 2025
- 2 minute read
The AddOrUpdateChoices() method adds or updates standard operation step choice records in the Std_Oper_Step_Choice table.
This overthrow of the method adds or updates one or more standard operation step choice records.
'Declaration
Public Overloads Shared Sub AddOrUpdateChoices( _
ByVal sessionId As Integer, _
ByVal operId As String, _
ByVal stepNo As Integer, _
ByVal deleteAll As Nullable(Of Boolean), _
ByVal stepChoiceList() As StepChoice _
)
'Usage
Dim sessionId As Integer
Dim operId As String
Dim stepNo As Integer
Dim deleteAll As Nullable(Of Boolean)
Dim stepChoiceList() As StepChoice
StdOperStepChoice.AddOrUpdateChoices(sessionId, operId, stepNo, deleteAll, stepChoiceList)
public static void AddOrUpdateChoices(
int sessionId,
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.
- operId
Required. Holds the ID of the operation to which the step belongs.
- stepNo
Required. Holds the number of the operation step.
- deleteAll
Optional. Holds a flag that, if set to true, specifies that any standard operation step choice records that match the supplied operId and stepNo values, and the choiceNo values in the StepChoice objects, be deleted from the Std_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 Std_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 Std_Oper_Step_Choice table. If the choiceLabel is supplied and a row identified by the stepNo exists in the Std_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 Std_Oper_Step_Choice table, a new row for the choiceNo and choiceLabel is created.