/
Choices expression
Choices expression
A JavaScript expression executed in Field Execution Context. An expression should return an array of objects representing the options available for selection. Each option should contain:
Name Type | Return type | Description |
---|---|---|
|
| a property of any type except array (it can refer to an existing object which is not created in Choices expression) |
|
| required if |
Option in its original form will be available in the Option template scope. You can define any additional properties to later use them in the Option template.
Examples
// doesn't work:
[
{ value: { name: 'A' }, label: 'a' },
{ value: { name: 'B' }, label: 'b' }
]
// works:
[
{ value: wizardState.objectA, label: 'a' },
{ value: wizardState.objectB, label: 'b' }
]
[
{ value: 'A' , label: 'a' },
{ value: 'B' , label: 'b' }
]
, multiple selections available,
Related content
Option template
Option template
More like this
Creating a Single or Multiple Selection Field
Creating a Single or Multiple Selection Field
More like this
Field Settings for Simple Selection Fields
Field Settings for Simple Selection Fields
More like this
Creating a Dynamic Selection Using Choices Expressions
Creating a Dynamic Selection Using Choices Expressions
More like this
JavaScript Operators Used for Boolean Expressions
JavaScript Operators Used for Boolean Expressions
More like this
Creating Selection Fields
Creating Selection Fields
More like this