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 / Possible bug: Default ...
Power Apps
Answered

Possible bug: Default property in the Checkbox in a Gallery. Need Help with a Solution Please

(0) ShareShare
ReportReport
Posted on by 92

Hi All,

 

I have a setup whereby my checkboxes display mode is disabled when one value is selected. When the user goes to edit the form, the unselected values should remain disabled (Please see Figure 1 below). It's a method I got from Daniel Christian's Power Apps: Limit number of checkbox selections in a gallery 

 

Now I have noticed the method does not work for some odd reason, Probably due to the PowerApps updates 🤔. When a User re-enters the form to edit the form. The disabled values somehow become available, even though there's one opposing value still in the collection. Which should limit the user’s choice of selection. (Please see Figure 2 below)

 

I carried my own test and I noticed, when I choose any other checkbox other than the first checkbox, the default property of the checkbox is off/False and I do not understand why? Because the Checkbox text property is ThisItem.Value and the default property is ThisItem.Value in colContractUsed.Value. This should make the default property True and should remain True after submission, because it is a selected value that is in the collection. (Please see Figure 3 below).  Please can anyone help with a solution, as this has disrupted the functionality of my other apps as well.

 

Thank you in advance.

 

Teddy.

Images:

Figure 1: How it's supposed to work

Figure1: How it is suppose to workFigure1: How it is suppose to work

 

Figure 2: When the User Re-enters the form. All Checkboxes become available for selection. Instead of only One being available and the rest disabled

When the User Re-enters the form. All Checkboxes become available for selection. Instead of only One being available and the rest disabledWhen the User Re-enters the form. All Checkboxes become available for selection. Instead of only One being available and the rest disabled

 

Figure 3: The test noticed the default property remains Off instead of staying On. Unless the selected value is not the first checkbox.

Figure 3: The test notice the default property remains Off . if the selected value is not the first checkboxFigure 3: The test notice the default property remains Off . if the selected value is not the first checkbox

 

Here are my code settings:

 

Data card settings: 

Default: 

 

ThisItem.'What form of contract will be used'

 

 Update:

 

First(colContractUsed)

 

Gallery Setting:

Items:

 

Choices([@'Approval To Let Test'].'What form of contract will be used')

 

Checkbox Settings:

Text:

 

ThisItem.Value

 

Oncheck:

 

Collect(colContractUsed,ThisItem.Value);

 

OnUncheck:

 

RemoveIf(colContractUsed,Value=ThisItem.Value);

 

Default:

 

ThisItem.Value in colContractUsed.Value

 

 Display mode:

 

If(Self.Value||(Value(GLB_6.Text)=0),DisplayMode.Edit,DisplayMode.Disabled)

 

Label Settings:

Text:

 

CountRows(Filter(Gallery6.AllItems,Checkbox6.Value))

 

 

 

 

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Teddy1 ,

     

    Can I suggest you use a radio control instead of this method? This control does exactly what you are trying to achieve.

     

    In the tutorial you can find how to make it work in a form: (1) Solved: Form Radio Button How To (Show Default Value, Upda... - Power Platform Community (microsoft.com)

  • Teddy1 Profile Picture
    92 on at

    Hi @BCBuizer ,

     

    Thank you for your response, I would use it but the radio buttons are not suited for this type of project. 

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Teddy1 ,

     

    May I ask why not?

  • Teddy1 Profile Picture
    92 on at

    Hi @BCBuizer ,

     

    I built several apps for this project and the sponsor has already seen how it was working before with the checkboxes. When I went back to them and suggested to move the project on with radio buttons, they weren't keen. Plus I am running against a tight deadline to make any major changes to the layout of the forms, and I have three apps more to build after this one.

     

    This is frustrating because I am still relatively new to PowerApps and this function/ method was working perfectly I had no issues. Now all of a sudden all my apps are broken. The new update from Microsoft, yeah it really messed me . I do apologise for venting.😤😂, but I am sure the PowerApps Community💪 can understand where I am coming from.

     

     

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Teddy1 ,

     

    Try these updated settings for the checkbox.

     

    Checkbox Settings:

    Text:

     

    ThisItem.Value

     

    Oncheck:

     

    ClearCollect(colContractUsed,ThisItem.Value);

     

    OnUncheck:

     

    Remove(colContractUsed,ThisItem);

     

    Default:

     

    Parent.Default.Value = ThisItem.Value

     

     Display mode:

     

    If(Self.Value||CountRows(Filter(Gallery1.AllItems,Checkbox6.Value))=0,DisplayMode.Edit,DisplayMode.Disabled)

    *Replace Gallery1 with the name of your gallery.

  • Teddy1 Profile Picture
    92 on at

    Hi @BCBuizer , I tried the ..

    Parent.Default.Value = ThisItem.Value

    However it produced an error.

     

    Thanks though.

     

  • Verified answer
    Teddy1 Profile Picture
    92 on at

    Hi @BCBuizer , 

     

    Thank you for helping me out, much appreciated, but I just solved my issue.

     

    If anyone is following the Multiple Selection Checkbox method by  @mdevaney  or @RezaDorrani (I followed Matt's Devaney's method), and is using Daniel Christian's Power Apps: Limit number of checkbox selections in a gallery 

     

    Here is the solution, using my example above.

     

    Instead of the label setting being...

     

    Old Label Setting: 

     

    CountRows(Filter(Gallery6.AllItems,Checkbox6.Value))

     

     

    New Label Setting:

     

    CountRows(Filter(Gallery6.AllItems,Checkbox6.Text in colContractUsed.Value))

     

     

    This simple New Label Setting helped me to Limit the number of checkbox selections in a gallery. So when a user re-enters the form one checkbox is available for selection and the rest are disabled. Like in Figure 1 and Figure 3 above.

     

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

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard