cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ez1138
Helper V
Helper V

Populate Word, Compose from "Apply to each"

Hi,

 

I have some "Apply to each" pieces of my puzzle and I'm looking to populate a word document.  For the compose, I can use the following syntax.  What can I do for components of my flow from the "Apply to each" components?

 

From compose....

outputs('Compose_company')?['value']?[0]?['Company_Name']

 
From apply to each...
??
8 REPLIES 8
v-bofeng-msft
Community Support
Community Support

Hi @ez1138 :

If you want to get the output of 'Apply to each', that's not possible because 'Apply to each' just executes the loop without any output.
If you want to get the value of the current loop in the 'Apply to each' loop, then you need to use the items function.

Best Regards,

Bof

ez1138
Helper V
Helper V

Thanks for the reply. Using the compose statement I used before simply as a reference what is the best way to use your items example? Also, is this the best way to do things since I’m pulling from multiple tables? That’s more of a loaded question but I guess my starting point would be to see if I can get the items example  to work. Thanks for your time.

Hi @ez1138 :

Sorry I can't understand what your needs are from your description and formula provided. Can you provide some detailed description and screenshots?

In addition, regarding the usage of apply to each, here are some examples for your reference:

Solved: Re: How to link a column value to an email - Power Platform Community (microsoft.com)

Solved: Re: Using SQL and Flows for recurring reminders? - Power Platform Community (microsoft.com)

Solved: Re: Adding Dynamic Content to Email - Power Platform Community (microsoft.com)

Solved: Re: Updating Rows - Power Platform Community (microsoft.com)

Best Regards,

Bof

Mister_Shaik
Solution Sage
Solution Sage

Hi @ez1138 ,

 

What is the case scenario here? You have a bunch of arrays and want to generate a word document using it in a repeating section?

 

If the data you're getting is in the format of an array of objects, why don't you use a select action? It will take array as input and give the output also as an array, but in a format that you've specified.

 

1. Select action.png

Mister_Shaik_0-1643267914082.png

 

If my assumption is wrong and you have a different process in plan, then please provide me the details so I can advise you with a better solution.

 

Hope you find this helpful! 🙂

 

Kind Regards,

Shaik Sha
________________________________________________________________________

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

Thanks for the reply.  This is how I have it structured (screen-shot).  Using this example, could I use the following code?

 

item()?['Title_Role']

 

ez1138_0-1643320969748.png

 

Just did a mouse over on the "compose".

 

ez1138_1-1643321160123.png

 

Mister_Shaik
Solution Sage
Solution Sage

Hi @ez1138 ,

 

I have used the compose action just to show you what format the data comes in.

 

You can use the Values output property of get rows client async and use it directly as input to Select action

2. use output of get rows in select from.png

 

Then, in the Map property, give the new column name and value of column to split into a separate array,

3..png

 

The Key is the column name you want for this and Value is the "item()?['#property name from get rows output']"

 

Hope this is clear for you 🙂

 

Kind Regards,

Shaik Sha
________________________________________________________________________

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

ez1138
Helper V
Helper V

Appreciate the reply.  Using the "Title_Role", what's the syntax/code to place it in the Word document?

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.

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 (2,547)