How can I remove the trailing semicolon when displaying the output of a!forEach().

I am looping through a data type process variable using the a!forEach() function. The output is displayed in an email body. There is a trailing semicolon character after all but the last row Example:

this is some text;

this is some text;

this is some text;

this is some text

I have tried using the stripwith() function to remove the semicolon, but that does resolve the issue.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to seze

    You were returning not one string, but a list of 4 strings.  Any user facing output displays the list of strings as a list in a string.  It does this through implicit casting, which includes adding those super handy semicolons for you.

    When you a!flatten(), you magically transform your list of strings . . . into a list of strings.  It literally does nothing to an array that's already not nested.

    joinarray() takes a list of whatever and crams them all into one string, with an optional separator, so you can replace semicolons with even more annoying @ or # or $ if you want to.

Children
No Data