web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Select All items in Ga...
Power Apps
Unanswered

Select All items in Gallery using a button or checkbox

(0) ShareShare
ReportReport
Posted on by 10

I have a canvas app Gallery and want to be able to select all the items 'Select(Parent)' by either pressing a button or checking a Checkbox. How could I achieve this?

antoniebrown1_0-1666790924936.png

 

Categories:
I have the same question (0)
  • Anonymous_Hippo Profile Picture
    1,247 Super User 2024 Season 1 on at

    Hello @antoniebrown1 ,

     

    Are you selecting items to move to a collection ?

     

    Here are two ways

     

    1. This is a solution by cbernier12 : https://powerusers.microsoft.com/t5/Building-Power-Apps/Gallery-select-all-and-add-to-collection/td-p/779565

     

    Add a checkbox outside of the gallery and add the values:

    OnCheck: 

    UpdateContext({CheckCheckbox:true});ForAll(Collect(ItemSelectionCollection,'MyGallery'.AllItems),ThisRecord)

     

    OnUncheck:

    UpdateContext({CheckCheckbox:false});Clear(ItemSelectionCollection)

     

    For the checkbox in the Gallery add the term "CheckCheckbox" in the "Default" field setting.  This is referenced in the select all checkbox info above.

     

    When I use my search box that lives outside of the gallery to narrow down results and check the "select all" checkbox it only selects the items in view and adds them to the collection.  When I uncheck, it unchecks the items and clears the collection.

     

    2. If you are filtering to select these multiple values then you can easily replicate that by copying the items property of your gallery into a button , so when you run the OnSelect, a collection would be made of the filtered components

     

    Cheers !

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard