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 / How to make a select a...
Power Apps
Unanswered

How to make a select all button that only checks the checkboxes for what the user search's in a Gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have been struggling with trying to create a select-all button that only selects items based on the user search.

 

For example, if I want to search for a specific group of people who all like green and all the green people show up in my gallery, I am trying to create a select all button that only selects those users and checks only the selected people (green) Check Boxes.

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

    Use the same filter you are using in the gallery to select all. 

     

    Filter the data by what the user has, and when he clicks your select all button, change all of those records to have the check box checked.

     

    So do something like:

    ForAll(Filter(DATA, equation being used),This.checkbox = true)

    or whatever you are using. I don't think my syntax and everything is right, but this should give you a general idea.

    Generally, just use ForAll() to do something to each record you get, and use the filter, search, or lookup you are using in the gallery.

     

    Or another way is to find all the current items in the gallery and use a ForAll(), but I don't know how to do that even though it would give cleaner code. The solution I gave is the rough and dirty way to do it - if you want cleaner go with what I just suggested I just don't know how to do it off the top of my head.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This is the current code 

    ForAll(Filter('Date_Name', StartsWith('Full Name', TextSearchBox1)|| StartsWith('Company Name', TextSearchBox1.Text) || StartsWith('Current Employer', TextSearchBox1.Text) || StartsWith('Studio Roles', TextSearchBox1.Text)), Collect(CheckedItems, ThisRecord));
    UpdateContext({refreshGallery: true});
    UpdateContext({refreshGallery: false});

    It works for when I don't search anything and select all the checkboxes in the gallery, but when I search a specific detail like studio roles it doesn't check any checkboxes

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This is for my select all button

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard