...
Fields defined in a Universal Template as type Array will have a value of type list
in the fields dict. Each element of the list will be populated with a dict
that represents the array element from the Controller. The dict
representing the array element will contain a key value pair where the key corresponds to the element Name in the Controller and value corresponds to the element Value in the Controller. The “value” portion of the element will be of type str
. For example:
[ { "My_element_1": "Value 1" }, { "My_element_2": "Value 2" } ]
{ "array_1": [ { "My_element_21": "Value 1" }, { "My_element_2": "Value 2" } ] }
...
Code Block | ||||
---|---|---|---|---|
| ||||
# Get the value of the 'actionchoice_1' field choice_value = fields.get('choice_1', [""])[0] |
...