cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Soumiya15
Helper III
Helper III

How to add new line as delimiter in join

Hi all,

Please help me out with how to add a new line delimiter in the join function

join(createArray('Apple', 'Orange', 'Pear'),'s\n ')

this returns  

'Apples\n Oranges\n Pears'

But the required output is 

apples

oranges

pears

Could anyone help me out how to achieve it.

Thanks in adavanced 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Soumiya15,

 

In that case just use this:

join(createArray('Apple', 'Orange', 'Pear'), decodeUriComponent('%0A'))


Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

5 REPLIES 5
Expiscornovus
Super User
Super User

Hi @Soumiya15,

 

Can you try this expression instead:

 

join(createArray('Apple', 'Orange', 'Pear'), concat('s',decodeUriComponent('%0A')))

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Expiscornovus
Super User
Super User

Hi @Soumiya15,

 

I just realised that the last item will not have the join character. So, in both our examples Pear will stay Pear and not become Pears because it is the last item of the array 😁

 

In that case probably the setup below is a better suggestion.

In here I use a Select to apply a concat with an s character at the end of the item (in text mode of the Map field). After that I use a join function again to add the line feed character.

 

select_add_s.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Adding s is not need i want to split all three in new line 

Expiscornovus
Super User
Super User

Hi @Soumiya15,

 

In that case just use this:

join(createArray('Apple', 'Orange', 'Pear'), decodeUriComponent('%0A'))


Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hey thanks for help it worked😊

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (1,641)