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 Apps / ForAll statement for G...
Power Apps
Answered

ForAll statement for Gallery Items

(0) ShareShare
ReportReport
Posted on by 3,347

I have a complex Items statement for a Gallery.  I would like to apply a ForAll statement separate from the main statements driving Items, for sake of keeping things more orderly.  I know I can wrap the statement around the entire items statement as "source" for the ForAll(), but that gets so ugly.  I was hoping to apply ForAll, using Gallery.AllItems as the source.  Is this possible?

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @martinav 

    Yes, you can use a ForAll on the AllItems of a Gallery:

       ForAll(yourGallery.AllItems, ...

    You can even filter by conditions in the Gallery - such as a checkbox:

       ForAll(Filter(yourGallery.AllItems, checkBox.Value), ...

     

    I hope this is helpful for you.

  • martinav Profile Picture
    3,347 on at

    I think my issue was I was doing this after the main statement in the Items control of the gallery.  I'm guessing that has circular logic.  I'm guessing this needs to be in a button OnAction or something outside of the gallery. 

     

    I have found a way to re-arrange my items to make it simpler anyway.  I'll close this and revisit later if needed.

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @martinav 

    Ah yes, I had assumed you had this on a button or some other action.  Right, you would not have this in the items property of the Gallery as that would definitely be circular.

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard