web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Use Output of compose ...
Power Automate
Answered

Use Output of compose in get items filter query

(0) ShareShare
ReportReport
Posted on by 20

Hi

I need help in using filter query in get items from compose outputs.

 

Below is the output from compose 

[
  "First",
  "Second"
]
 
I need to pass this in filter if the name matches in the list, but below is how I get the output 
 
ganeshn07_0-1670172743737.png

 

Please help how I can compare and get items from the list if it matches.

Categories:
I have the same question (0)
  • Rhiassuring Profile Picture
    8,692 Moderator on at

    If you just want the First one, you can use the expression "first()" - in between the brackets you put the output from your Compose.

     

    If you want to do it for each item in your Compose's output, you can use an "Apply to Each" and then point the Filter Query at the "Current Item" (it'll be at the very bottom of your dynamic content). 

     

    Like this:

     

    Rhiassuring_0-1670198234410.pngRhiassuring_1-1670198252181.png

     

  • Verified answer
    v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @ganeshn07 

     

    You can use or to connect two conditions in the filter query (note the single quotes).

    vliweimsft_0-1670203311029.png

    Title eq 'A' or Title eq 'B'

     

    Best Regards,

    Levi

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    Here's an example that should work with as many items in your array as you want. Effectively, it builds up the filter for each item separated by an or clause.

     

    Full flow below. I'll go into each of the actions.

    grantjenkins_0-1670211400776.png

     

    Compose contains your array of items.

    grantjenkins_1-1670211444361.png

     

    Select will build up an array of individual conditions. The expression used here is:

    concat('Title eq ''', item(), '''')

    grantjenkins_2-1670211514349.png

     

    If I ran my flow now, I'd get the following output from my Select:

    [
     "Title eq 'First'",
     "Title eq 'Second'"
    ]

     

    Join will join each of the items above, separated by ' or '.

    grantjenkins_3-1670211639097.png

     

    The output from my Join would be:

    Title eq 'First' or Title eq 'Second'

     

    Get items can then use the output from the Join as the Filter Query we need.

    grantjenkins_4-1670211706446.png

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 469

#3
11manish Profile Picture

11manish 364

Last 30 days Overall leaderboard