How to split a collection with a line break?

  • 12 October 2016
  • 6 replies
  • 6 views

Badge +7

Hi,

the title really says it all. I have a collection of all the Task Title of the Workflow task list.

I want them to all stand under each other in a mail.

Maybe a workaround? Thanks!!


6 replies

Userlevel 4
Badge +11

Hi Nina,

you could process your collection with a For Each action,

inside the for each you can put each title inside the collection in a new multiple lines of text variable where you add to the previous content of that variable the new value in a new line.

Then, outside the for each, you can reference the multiple lines of text variable inside your email.

Hope this help

Giacomo

Badge +7

Hi,

yes I thought of that too but I don't know how many items are in the collection, sometimes it could be 3, sometimes 30 and I don't want to create 30 variables.. grin.png not sure yet what to do.. or I count the items and just view the first 10 in a mail..
I think about it but thank you anyway!

Userlevel 4
Badge +11

Hi Nina,

you need only three variables:

- the collection

- the single element (that will be stored by the For Each action, in each iteration it will get the value of that iteration)

- the multiple lines of text

It's the For Each that does the "magic" and processes all the items in the collection, you don't need different variables for each value in the collection..

Badge +7

Ahh, I misunderstood you! Okay yes that sounds good actually. I think I limit it to 10 though anyway grin.png 

Badge +5

Hi Nina, you can achieve this by using the Replace inline function directly on the collection variable using the Build String action . Essentially replace the ; of the collection with a </br> as per the below example:

fn-Replace({WorkflowVariable:varCOLText},;,</br>)

Mitch

Badge +3

This worked for me:

fn-Replace({WorkflowVariable:colApproverComments},;,<br>)

I had to delete the slash in <br>.

Steo

Reply