Newer Version Available
Metadata Wizard Expression
Expressions are used to dynamically provide values to Wizard
Components. Components can accept expressions in some of their metadata properties in order to
be able to have dynamic behavior. With expressions, you can access other Wizard Components
instance values in order to dynamically set the metadata attributes and create conditions.
When a Wizard Component has an expression as any of their metadata attributes, the Wizard
Component is re-rendered every time the expression value changes.
Literal Value
Any expression that doesn’t match the structure of the other expression types, is considered a literal
- Example
1"{! !(promoTemplate.Name == 'Test' || promoTemplate.Name != 'Test2') }"
2...Properties of identifiers can be accessed using dot notation:
1"{! promoTemplate.Name }"| Literal | Example | Resolves to |
| true | "{! true }" | Boolean true |
| false | "{! false }" | Boolean false |
| null | "{! null }" | null |
String Expressions
A string with a specific start and end sequence of characters ("{!" and "}"). These expressions are used to retrieve values from other Wizard Component instances. In order to reference another Wizard Component instance, you must specify the component ID.
- Example
1...
2{
3 "id": "myCheckboxField",
4 "type": "Checkbox",
5},
6...
7{
8 "id": "myOtherField",
9 "active": "{! myCheckboxField }",
10...Logical Expressions
An object with 3 properties- left, right and operator. This type of expression is used to perform operations between different values.
- Example
1{
2 "left": <expression>
3 "operator": "equal",
4 "right" : <expression>
5}
6
7// Example
8...
9"active" : {
10 "left": "{! myCheckbox}",
11 "operator":"equal",
12 "right": true
13},
14...List of the available operators:
- and
- or
- equal
- notEqual
- greaterThan
- lessThan
- greaterThanOrEqual
- lessThanOrEqual
- sum
- subtract
- multiply
- divide
Expression Variables
Additional values can also be referenced from expressions:
- _input_ → The input payload passed to the Wizard instance during its creation. Can be
used to set default values:
- "{! _input_.Slogan }"