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 / On check only a single...
Power Apps
Answered

On check only a single check box in a gallery making all other checkbox inactive.

(2) ShareShare
ReportReport
Posted on by 15

Can we on check only one check box instead of multicheck boxes in a gallery which is having number of checkboxes. When, on chekc a checkbox, gallery should not allow to on check another check box. I just want to send only one check box data to my table. Can anybody help on this?

Categories:
  • Rebetcha Profile Picture
    645 on at
    Can you add some screenshots to clarify your question? Thank you.
  • mg_n Profile Picture
    15 on at

    Arrow shows my gallery. When i on check one check box the other should be inactive( which means i should not able to on check other check boxes). 

    SS1.png
  • Rebetcha Profile Picture
    645 on at
    There is no good solution doing this using the gallery control. The only option you have is to set a variable on the OnCheck property of the checkbox. Than use that variable in een If-statement on the Displaymode variable of the checkbox to disable it. But that means that after checking 1 checkbox you will not be able to deselect it and select another one since all the in a gallery checkboxes share the samen formulas.
  • mg_n Profile Picture
    15 on at

    Thank you for the reply. But that doesn't serve my purpose. Is there any alternative you have?? 

  • Rebetcha Profile Picture
    645 on at

    Couple of options:

    1. You could use a combo box or drop down instead of the gallery with check boxes(set to SelectMultiple=false)
    2. You could at to the number of check boxes you need instead of the galery. You can then configure OnCheck of each check box to set a variable to true and OnUncheck to set this variable to false. In the Displaymode-property of each check box you ad a function that says if the chec box is unchecked and the variable is set to true (that means another check box is checked) Displaymode.Disabled, otherwise Displaymode.Edit. 
  • mg_n Profile Picture
    15 on at

    I have done this to my other fileds which are not in gallery. But they wont uncheck on the refreshing of the screen. The last oncheck box will be marked oncheck only. On refresh of the screen or sending data to table, all checkboxes default property should be uncheck. 

  • Rebetcha Profile Picture
    645 on at

    Hi @mg_n, there are 2 ways to make this happen. You could either use the Reset-function or toggle the Reset property of the check box controls based on an action in your app. 

    In your case the quickest way probably is to toggle the Reset property. My guess is you have some icon or button you press to save data or navigate away from the screen. If you use a button, you can add <buttonname>.pressed to the reset properties of all check boxes. If you use icons you will have to set a variable to toggle the reset property between true and false.

    If you want to use the Reset function you add Reset(<Checboxname>) for each check box to the OnHidden property of the screen that contains the check boxes and in the same property where tou put the formula that sends data to table. 

     

    More info:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-reset

  • mg_n Profile Picture
    15 on at

    Hi Rebetcha,

     

    You got my problem exactly. I have tried this soultion before writing here. Checkboxes will reset after the button is pressed but i am not able to oncheck other checkboxes until unless i oncheck and uncheck the previous checkbox which was reset. If i do that, i can oncheck any of my checkboxes.

  • Rebetcha Profile Picture
    645 on at
    If you added a variable that sets the displaymode of the checkboxes as discussed earlier in this thread, you have to also set this variable to 'false' in the same action. In that way in one move you reset all the check boxes and make them all checkable (is that a word 😉 ) again.
  • Yashaswini Profile Picture
    4 on at

    how do i ad funtion in the display mode

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

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard