You can get an array of strings by simply giving any field a name with brackets. For example: modalStack[1-3] will generate an array with between 1 and 3 items inclusive. You’ll probably want to use custom list for the field type.
Thanks for the quick response. I did totally miss that one. Apologies for that. I got that working however it would be good to control the number of elements from formula.
Schema is for example:
payload.id > custom list [getHelp,getHelp_campuses,getHelp_phone,getHelp_callBack]
payload.pageStack[1] > formula if field(‘payload.id’) == ‘getHelp_campuses’ then ‘getHelp’ elsif field(‘payload.id’) == ‘getHelp_phone’ then ‘getHelp’ elsif field(‘payload.id’) == ‘getHelp_callBack’ then ‘getHelp’ else nil end
This works fine if the array is a single element, however, there are two issues with this approach:
field(‘payload.id’) == ‘getHelp_callBack’ then ‘getHelp’ should actually have two elements in the array e.g.
“pageStack”: [
‘getHelp_phone’,
‘getHelp’
]
else nil outputs
“pageStack”: [
null
]
Event though “include null values” is unchecked.
Could you please point me in the right direction here?