web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
Power Automate - Building Flows
Answered

Apply to Each object/string in a union (Compose)

Like (0) ShareShare
ReportReport
Posted on 9 Apr 2021 16:20:32 by 82

I have got unique rows from column 'InquiryID' by a union expression in Compose step.

 

I now want to loop through each of these unique ID's by using the output of this compose, but I have not found the correct way to. 

 

This is what my steps look like, when ran they work correct and give the correct output - 

 

dwalker97_0-1617985105188.png

 

I would like to reference each individual ID in a for-each loop as I will be cross-referencing these with another table. How do i reference each item of this union?

 

 

 

I have the same question (0)
  • dwalker97 Profile Picture
    82 on 14 Apr 2021 at 11:02:57
    Re: Apply to Each object/string in a union (Compose)

    Perfect, that worked.

     

    Thanks!

  • Verified answer
    Paulie78 Profile Picture
    8,416 Moderator on 09 Apr 2021 at 16:47:01
    Re: Apply to Each object/string in a union (Compose)

    create a for each loop with your union as the source and you can reference it within the loop using:

    item()['InquiryID']

    As you only have one property in your array, you can make it even easier by putting the select action into text mode, and the put the InquiryID into the map. Then you will have a plain array of InquiryIDs, then perform your union again.

     

    If you do that, in your apply/each, it will simply be item()

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 626 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 374 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 284 Most Valuable Professional

Last 30 days Overall leaderboard
Loading started
Loading started
Loading complete