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 / Checkboxes inside Gall...
Power Apps
Answered

Checkboxes inside Gallery reset at after the button is clicked to filter the gallery

(0) ShareShare
ReportReport
Posted on by 11

Hello - I have a gallery with check-boxes, the gallery is filtered by a set of buttons (located outside of the gallery), button1, button2, button3 etc. When I select the checkbox under button1, press button2, and go back to number one, the checkbox dissapears and the value of all items in the gallery is turned to true. 

 

Checkbox onCheck property is: 

 

 

 

Collect(SelectedItems,ThisItem)

 

 

 

 

Checkbox onUncheck property is: 

 

 

 

Remove(SelectedItems,ThisItem)

 

 

 

 

What type of formula should the button have to retain the checked value of the gallery item? 

 

Thank you

Categories:
  • mmollet Profile Picture
    3,187 on at

    I think what is happening is they are resetting bc it is fetching new data. I'm assuming that these checkboxes aren't tied to a column in the data source? If they aren't then you can add a column locally and make it default to false. Then use ThisItem.ThatColumn for the default values of the checkboxes.

     

    Here is the syntax of the AddColumns function

    AddColumns( Table, ColumnName1, Formula1 [, ColumnName2, Formula2, ... ] )

    • Table - Required. Table to operate on.
    • ColumnName(s) - Required. Name(s) of the column(s) to add. You must specify a string (for example, "Name" with double quotes included) for this argument.
    • Formula(s) - Required. Formula(s) to evaluate for each record. The result is added as the value of the corresponding new column. You can reference other columns of the table in this formula.

     

    Something like:

    ClearCollect(LocalSPListName, SPListName);

    AddColumns(LocalSPListName, "isSelected", false);

     

    Checkbox.Default -> ThisItem.isSelected

  • Annasuela Profile Picture
    11 on at

    Hi @mmollet - Thank you for the quick reply.

     

    These checkboxes are located inside a gallery which is connected to a collection. The user will check the completed items and based on their response, the items will display to another gallery which will connect to a SP list.  However, when I click any of the below boxes, the card turns to green checkboxes automatically disapear.

     

    Here's an image of my checkboxes. In this instance:

    1. I clicked on the Servers Button
    2. Made my selection 
    3. Clicked Voice
    4. Went back to Servers and this is my view
      1. the boxes are supposed to be green and checked  

    Annasuela_1-1684961716144.png

     

    Thank you again

     

  • Verified answer
    Annasuela Profile Picture
    11 on at

    Here's the solution to this problem:

    Checkbox Property:

    OnCheck

    collect(name,thisItem)

    OnUncheck

    remove(name,thisItem)

    Default Property: 

    If(IsEmpty(Filter(name, ID = ThisItem.ID)), false, true)

     

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard