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 / Check all checkboxes i...
Power Apps
Answered

Check all checkboxes inside gallery AND perform Collect

(0) ShareShare
ReportReport
Posted on by 421

Hi everyone good morning. I am using a gallery with a check box and I have a checkbox outside the gallery that when checked, checks all the checkboxes inside the gallery as intended.  However I have the following Collect formula when I check an individual checkbox inside the gallery. 

 

Collect(
colAddTasks,
{
TaskItem: tiTaskTitle.Value,
StoreLocationNum: ThisItem.ActualStoreNumber,
StoreLocation: ThisItem.Location,
TaskStart:calTaskStartDate.Value
}
);

 


How can I check all the boxes with the single check box and still perform the collection?

 

Thanks!


Chris

Categories:
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @ckserra33,

     

    You can use a variable and the Default property of the Checkbox within the gallery.

     

    (1) OnCheck & OnUnCheck of the checkbox outside the gallery

    //OnCheck
    UpdateContext({varCheckAll: true});
    Collect(
     colAddTasks,
     ForAll(
     GalleryName.AllItems,
     {
     TaskItem: tiTaskTitle.Value,
     StoreLocationNum: ThisRecord.ActualStoreNumber,
     StoreLocation: ThisRecord.Location,
     TaskStart:calTaskStartDate.Value
     }
     )
    );
    
    //OnUnCheck
    UpdateContext({varCheckAll: false});
    Clear(colAddTasks)

     

    (2) Set the Default property of the checkbox within the gallery to:

    varCheckAll

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • ckserra33 Profile Picture
    421 on at

    @LaurensM YES!! Thats perfect thank you VERY much!!

  • LaurensM Profile Picture
    12,516 Moderator on at

    Glad I was able to help @ckserra33 😊

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard