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 / Select All in checkbox...
Power Apps
Answered

Select All in checkbox Gallery not working properly

(0) ShareShare
ReportReport
Posted on by 603

I have a powerapp gallery with Select All checkbox. When user checks the Select All checkbox, all the gallery items gets selected. 

 

Iantaylor2050_0-1685268798055.png

 

 

On App Start contains below code

ClearCollect(colListData,AddColumns(Items,"checkBoxVal",false))

 

Gallery checkbox oncheck

UpdateIf(
colListData,
ID = ThisItem.ID,
{checkBoxVal: true}
)

 

Gallery checkbox onuncheck

UpdateIf(
colListData,
ID = ThisItem.ID,
{checkBoxVal: false}
)

Gallery Items property

colListData

 

Gallery checkbox default

If(SelectAllCheckBox.Value=true,SelectAllCheckBox.Value,LookUp(colListData,ID=ThisItem.ID,checkBoxVal))

 

Preview Gallery Items

Filter(colListData, checkBoxVal = true)

 

I have a preview gallery in next screen which will show the items checked in the current gallery. Whenever I click on SelectAllCheckbox and click on preview button, my preview gallery is empty. Also, if I click on Select All checkbox and uncheck some items in current gallery, the preview gallery doesnt show the checked records as well. Any idea where I am going wrong. 

Categories:
  • Verified answer
    cha_cha Profile Picture
    4,932 Moderator on at

    Hello @Iantaylor2050 

     

    How about you make these changes:

     

    On the checkbox here:

    Just set the default value to ThisItem.checkBoxVal

    cha_cha_0-1685270235536.png

     

    Then on the SelectAllCheckbox, For it's OnCheck property:

    With(
     {
     _temp: colListData
     },
     ForAll(_temp,
     Patch(colListData,
     ThisRecord,
     {
     checkValue:true
     }
     ) 
     )
    )

     

    Then on its UnCheck Property

    With(
     {
     _temp: colListData
     },
     ForAll(_temp,
     Patch(colListData,
     ThisRecord,
     {
     checkValue:false
     }
     ) 
     )
    )

     

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard