cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bravobravo
New Member

Combine output from Apply to each

Hello all,

I have generated an output from Apply to each action. May I ask how can I combine these outputs and generate something like :

user1@yahoo.com;user2@yahoo.com;user3@yahoo.com

Thank you very much

 

bravobravo_0-1597634805733.pngbravobravo_1-1597634869664.png

bravobravo_2-1597635086433.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
manuelstgomes
Super User
Super User

Hi @bravobravo 

 

Sure it's quite simple. You'll do it in no-time.

 

At the beginning of your, Power Automate define a variable of type string. 

Screenshot 2020-08-17 at 10.09.18.png

 

Then after each "Compose," add an "Append to String Variable." It will append the value of your Compose, but you need the ";" to be also added, so you need a simple formula to add it:

concat(outputs('Compose'),';')

 

Screenshot 2020-08-17 at 10.10.40.png

 

Now you have a variable with the information that you need.

 

Can you please check if and let me know if you have any questions?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

View solution in original post

5 REPLIES 5
manuelstgomes
Super User
Super User

Hi @bravobravo 

 

Sure it's quite simple. You'll do it in no-time.

 

At the beginning of your, Power Automate define a variable of type string. 

Screenshot 2020-08-17 at 10.09.18.png

 

Then after each "Compose," add an "Append to String Variable." It will append the value of your Compose, but you need the ";" to be also added, so you need a simple formula to add it:

concat(outputs('Compose'),';')

 

Screenshot 2020-08-17 at 10.10.40.png

 

Now you have a variable with the information that you need.

 

Can you please check if and let me know if you have any questions?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

I am thinking the exact same way as @manuelstgomes showed, very detailed solution! 

Hi there

 

When I try this and append to variable string the output of the compose from within the apply to each the concat of the compose returns only the the value per loop rather than all loops together.  I was thinking the append needs to happen outside the apply to each grouping but the compose output is not available outside the apply to each grouping.  Any help on this would be apprecited.

Regards

Jon

Ouryuusama
Frequent Visitor

I want to do the same thing. If you have found a solution, it would be a great help if you could share also.

skyeg
Advocate I
Advocate I

I think your 'compose' function goes within the loop, your 'append string to variable' goes outside the loop, but uses the output of the compose function - or that just worked for me.  Very useful thread!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,237)