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 / Condition to filter on...
Power Automate
Answered

Condition to filter on all results

(0) ShareShare
ReportReport
Posted on by 14

HI all, 

 

New to power automate here. 🙂

I've just created a flow and am a little stuck. I have a get list dataverse step which queries an entity and gives me approximately 10 results. I'm only concerned with one field which is status and if this has a value of cancelled for all results, then cancel the order. 

I'm not however sure how to setup a condition which allows me to get all results in the step. 

I have the following below which breaks the result up into 10 steps and if for example if I have status, cancelled in 2 results, it will run twice. It should however just run once if the status is cancelled in all results. 

Capturef1.JPG

 

Thanks for any help. 

Categories:
  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    Hey Mate,

     

    Can you give Filter array action a try ..

     

    From - Values

    and your condition.

     

    CFernandes_0-1618842924618.png

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

     

  • JimDowling Profile Picture
    14 on at

    Thanks. I've filtered the array. I'm just wondering how I make my condition then. I want to check if all results in the previous step had the status cancelled (282820003) and if yes, cancel order. Thanks again. 

     

    Capturef2.JPG

  • JimDowling Profile Picture
    14 on at

    @CFernandes 

    Hi again. 

    So I filtered the array and in my condition I check for all other status besides the cancelled status which is 282820003. In the condition I have the following, body('Filter_array_for_suspended_status')?[0]?['status']

    However, when I run the flow, the condition will default to no even if the status in one of the results in the array is 282820000.

    Capturef3.JPG

    Thanks for any help.

  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    Hey @JimDowling,

     

    Can you please check the output of Filter Array it should only include the outputs based on your condition. 

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • Verified answer
    JimDowling Profile Picture
    14 on at

    Hi, 

     

    I think i've resolved this. I used this in the Union step. 

    union(variables('Status'),variables('Status'),variables('Status'),variables('Status'))

     

    Capturef4.JPG

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard