Old requirement: User used to enter multiple email addresses separated with a comma and that combined value was sent from Appian to API for sending emails.
Here the highlighted rule input was saved as Text type in Interface.
Now the requirement from API end has been changed and they have updated the Email addresses variable to list of items. In order to handle this I have updated the Rule input to store multiple values
I tried to use a!foreach() in the saveinto parameter of a!textField() but Interface is not recognizing the multiple values as list of items. Can i please get some suggestions on how to handle this?
Discussion posts and replies are publicly visible
Display: Array → comma-separated stringSave: Comma-separated string → arrayYour Rule Input stays as Array type, but the interface handles the conversion automatically.Change your text field saveInto to handle the array conversion:
a!textField( label: "Email Addresses", value: joinarray(ri!emailAddresses, ","), saveInto: { a!save( target: ri!emailAddresses, value: if( isnull(save!value), null, split(save!value, ",") ) ) } )