Defines a type of list in which each list item may be one of the elements defined inside the list block.
Parameters
Parameter | Description |
---|---|
field-name (required) | The workflow script identifier of the field. |
element-definition (required) | An element definition. |
Remarks
When accessing the items in a list of choice
element in a workflow script,
the script first needs to determine which of the available element choices the given list item
is. Use the
list-of-choice-parent
.has
name-of-choice-element
()
method inside an if statement to do this.
Similarly, when populating a list of choice
element in a workflow script,
apart from the value for the new list item, the script also needs to declare which of the
available types the new list item is. Use the [Name]New()
method to do
this.
Samples
Accessing a list element and its attribute inside a list of choice in a workflow script
Creating list elements inside a list of choice in a workflow script
Download
the mopey.fls.xml
trigger form for the script
below.
Accessing a list element and its attribute inside an optional list of choice in a workflow script
Creating list elements inside an optional list of choice element in a workflow script
Download the pokey.fls.xml
trigger form for the script
below.
server program optionalChoiceWrite for form pokey using dacs optionalChoice; { var msg = messages.optionalChoice.New(); var betagamma = msg.alpha.betagammaNew(); var schroedinger = betagamma.AddNew(); schroedinger.beta = 7; var heisenberg = betagamma.AddNew(); heisenberg.gammaNew().delta = "Pauli"; }