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 / Set limit to Select Al...
Power Apps
Unanswered

Set limit to Select All Checkbox in Gallery

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I've built a Select All Checkbox to select all eligible checkboxes in a Gallery (the selected items must have the same id), but now I want to limit the maximum number of checkboxes that will be checked after clicking in the Select All Checkbox (the limit will be 200 checkboxes).

 

Here are some images before/after the select all. The Select All Checkbox is the upper one.

gacaar_0-1633095253709.png         gacaar_1-1633095279158.png

 

To check all eligible checkboxes I'm using a ForAll to go through all Gallery items and using a Collect together with an if to add all items that will be checked, like this:

 

 

 

ForAll(
 Gallery.AllItems;
 Collect(
 CollectionName;
 {
 someColunm: If([CONDITIONS];
 [SomeValue]
 )
 }
 )
);;

 

 

 

I wonder if there is a way to limit the size of the Collection, to break the ForAll loop, or to remove some rows of the Collection after the ForAll.

 

Categories:
  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    Hi @gacaar ,

    for the first 50 items, you could do this

    ClearCollect(
     CollectionName2,
     FirstN(
     CollectionName,
     50
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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 Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard