Skip to main content
August 25, 2023
Solved

Send Email Smart Service of a process variable that is a list - format

  • August 25, 2023
  • 2 replies
  • 0 views

Hi all,

I currently have a process model that uses a HTML template to send a list of users, but since my list is saved in a process variable it eliminates any breaks between the names of the users. Write now when I sent the email the list looks like this:

name1; name 2; name3; name 4; name5; and so on.

But I would like to display the list in a vertical format so is easier to read for the person who is receiving the email. I have tried an expression, scripthml, but nothing seems to work. Does anyone know how can I over come this? maybe editing the template? but I dont think appian lets you iterate over a HTML template.

Best answer by mathieud0001

You can create an expression to generate a HTML bullet list from a list of text:

concat(
  "
    ", a!forEach( items: ri!items, expression: concat( "
  • ", fv!item, "
  • " ) ), "
" )

Reference: www.w3schools.com/.../html_lists_unordered.asp

2 replies

mathieud0001
August 25, 2023

You can create an expression to generate a HTML bullet list from a list of text:

concat(
  "
    ", a!forEach( items: ri!items, expression: concat( "
  • ", fv!item, "
  • " ) ), "
" )

Reference: www.w3schools.com/.../html_lists_unordered.asp

August 28, 2023

Thank you so much! It worked, I had tried something similar but was forgetting the concat.