Can someone help with separating/line breaking a collection of locations?

  • 7 May 2020
  • 1 reply
  • 2 views

Badge +2

I currently have a collection of locations that I need to separate by line. Example I have below:


Workflow Notification
________________________________________
The following centers have not submitted a COVIDcount in the last 24 hours
Lanett;Bessemer;Riverchase;Winfield;Oneonta;Hueytown;Park Place;

 

I want to output by separate lines if possible:

Lanett

Bessemer

Riverchase

Winfield, etc.

 

I tried doing fn-Replace(WorkflowVariable:Collection,;,</br>)

Which returned only one location:

Lanett.

 

Can someone help or guide me in the right direction?

 


1 reply

Badge +12

@SpenSouv ...try below steps:

 

  1. Using Regular expression action:
    • Put ";" in the pattern (DO NOT use double quotes)
    • check ignore-case
    • select split operation
    • Add your collection with ";" as a source
    • store it in the collection variable
  2. Using for loop and above collection variable:
    • add build string action
    • use each value of your for loop, append it to final variable and add line break here

Reply