Hello community members,
can you help me with the syntax for a array of CDT?
i tried:
'type!{urn:com:appian:types}EBLE_Test'( {item: 1, checked: true, item: 2, checked: false } )
Discussion posts and replies are publicly visible
Got it working like this:
{
'type!{urn:com:appian:types}EBLE_Test'( item: 2, checked: true),'type!{urn:com:appian:types}EBLE_Test'( item: 3, checked: true),'type!{urn:com:appian:types}EBLE_Test'( item: 4, checked: false)}
If you wanted to save yourself the effort of hand-generating your test data you can use the a!forEach() loop, something like this:
a!forEach( items: fn!enum(10)+1, expression: 'type!{urn:com:appian:types}EBLE_Test'( item: fv!item, checked: fn!even(fv!item) = fv!item )
This will genertate an instance of the type for each item in the fn!enum() generated list,
The 'item' attribute is set to the fv!item, and the 'checked' attribute is set to true if fv!item is even, else set to false.
Thanks Steward