0

I'm populating a word document among other pieces and I'm having trouble with data from within an "apply to each". With the "apply to each" I have a compose statement.

For my "compose" components not nested in the "apply to each", I use the following without issue.

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

Any thoughts on how I pull from the "apply to each"?

Thanks for any insight!

  • Can you show us the section of your flow you're having problems with (via screenshot) and be specific as to what your issue is? – Skin Jan 26 '22 at 22:06

1 Answers1

0

when you are inside an "Apply to Each" action, you select an array/collection that will be used to apply the logic to each item.

So, if the Compose you use outside of the "apply to each" is

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

This means that in the "apply to each" action you will pass

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

and it will look like this

Apply to each parameter

You see that I have renamed my "Apply to each" to "My cycle", so when I want to compose something with this example, it will be

items('My_cycle')?['Company_Name']

or

item()?['Company_Name']

The difference is that items() requires the name of the iteration you want, and item() gets the item from the current scope it is in.

Please let me know if I understood your question and if this helps.

Best regards