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 / how to validate if a f...
Power Automate
Unanswered

how to validate if a field has certain value in all collection Power Automate?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, I'm using microsoft dataverse to connect to my Dynamics 365 trial instance.  and I'm using "List Rows" action.  So I'm looking for a way for do something like value.all(new_status eq 20) then  update related data...

Is there in Power Automate a expression or similar Like .net LINQ Collection.All(predicate)?

AlonsoCotez_0-1618961185622.png

e.g.: List Result =

[

{"name":"foo1", "statuscode":100},

{"name":"foo2", "statuscode":2},

]

now how to validate if all retrieved records the statuscode is 100 in this example the result would be FALSE.

if I use foreach control I don't want to trigger the update action each time per record, just one for hole collection, thanks.

Categories:
I have the same question (0)
  • PrasadAthalye Profile Picture
    on at

    You can use Array filter action.

     

    PrasadAthalye_0-1618964111471.png

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, thanks.
    but like the example above,

    [

    {"name":"foo1", "statuscode":100},

    {"name":"foo2", "statuscode":2},

    ]

     

    if i would like to know if all those results(in that example are 2... could be N ) the statuscode is 100, with filter it will just filter 1 record, doesn't it?(it wouldn't tell me if all records met certain condition).

  • PrasadAthalye Profile Picture
    on at

    Filter will give you output of array. You can check the length of an array which will let you know how many records met the condition.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Ok got it, basically what I want  to do is "if all retrieved records has an status 100" then update a table if not "do nothing"

     

     should I use foreach control and validate one by one and setting a bool variable like and observer to handler that then validate that variable to continue with the flow.... is that the right way or I'm complicating things?

    Thank you.

     

  • PrasadAthalye Profile Picture
    on at

    Can you please clarify what do you mean "if all retrieved records has an status 100" ...

     

    What do you mean status 100? Are you saying count of all retrieved records equals 100?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, yes I mean"if all retrieved records have an status 100"  that collection query a column named statuscode so I need to validate if in that list returned all statuscodes have as value 100 here a representatio e.g.

    [

    {"name":"foo1", "statuscode":100},

    {"name":"foo2", "statuscode":2},

    ]   

    wherever I placed the validation, it would be resolved as false because the returned data has an element with statuscode 2

    [

    {"name":"foo1", "statuscode":100},

    {"name":"foo2", "statuscode":100},

    ] this result would be resolved as true beacuse all elements return have a status 100

    thank you.

     

  • PrasadAthalye Profile Picture
    on at

    I think you will have to use filter condition on list rows to filter all rows where statuscode eq 100. Then run a loop on that collection to fire an update.

     

  • PrasadAthalye Profile Picture
    on at

    @Anonymous did you manage to solve this?

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard