Can anyone help me to display a list of values one below the other without any , or ; at the end in an expression rule? I have tried using char(10), char(13), concat function with <br> but none works.
Discussion posts and replies are publicly visible
Please share the details of where do you want to display the list values.
If it is in a paragraph field then the below code works:
a!paragraphField( value : if(isnull(ri!input_text),ri!a,joinarray(ri!input_text,char(10))), readOnly: false(), saveInto : a!save(ri!input_text,if(isnull(save!value),save!value,split(save!value,";"))) ),
The variable input_text is of multiple type text rule input. When the data is entered in the paragraph field separated by ';' delimiter then the data in the paragraph field gets displayed line by line.
Thanks for your response.
I wanted to display a list of values one below the other in an email using expression rule and it worked using the below code.
Try this, without loop
Vinay's code above should be sufficient. I would also like to point out that if you wrap the whole thing in stripHtml like in your original example here, the <br> tags will still be lost as stripHtml just gets rid of them. If the value of ri!input would need to have stripHtml run on it for sanitization reasons / etc, then it should go inside your forEach expression.
Following are 2 alternative examples that take care of this, the main difference being where and how the "<br/>" tag is added.
expression: stripHtml(fv!item) & if(fv!isLast, null(), "<br/>")
/* or, alternatively */
© 2021 Appian. All rights reserved.