cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

ForAll function in checking value

Hi All,

 

I have a collection that stores the ID and status of the document checked from the gallery(removed when unchecked), What I want to do is iterate over the collection if all the status is the same or not.

I'm trying to use this forall function, but it does not seem to work, although I think I'm missing something.

 

Concat(ForAll(selected.status,status in ["Pending Input from Collaborators","New"]),Value & "")

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous 

 

To check this, you can use the below expression:
 
If(CountIf(selected, status in ["Pending Input from Collaborators","New"]) = CountRows(selected), "Action to do if same status", "action to do if status not same")
 
The highlighted part check if the total number of rows in collection is equal to the number of rows satisfying the condition.
 
Hope this Helps!
 
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!

View solution in original post

1 REPLY 1

Hi @Anonymous 

 

To check this, you can use the below expression:
 
If(CountIf(selected, status in ["Pending Input from Collaborators","New"]) = CountRows(selected), "Action to do if same status", "action to do if status not same")
 
The highlighted part check if the total number of rows in collection is equal to the number of rows satisfying the condition.
 
Hope this Helps!
 
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!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,885)