thzu
Novice

How to split a collection with a line break?

Jump to solution

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!!

0 Kudos
Reply
6 Replies
jackgelo
Contributor

Re: How to split a collection with a line break?

Jump to solution

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

Reply
thzu
Novice

Re: How to split a collection with a line break?

Jump to solution

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..  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!

0 Kudos
Reply
jackgelo
Contributor

Re: How to split a collection with a line break?

Jump to solution

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..

View solution in original post

0 Kudos
Reply
thzu
Novice

Re: How to split a collection with a line break?

Jump to solution

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

0 Kudos
Reply
ms
Novice

Re: How to split a collection with a line break?

Jump to solution

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

Reply
SteveJonasson
Scholar

Re: How to split a collection with a line break?

Jump to solution

This worked for me:

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

I had to delete the slash in <br>.

Steo

0 Kudos
Reply