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 / how to Disable other c...
Power Apps
Answered

how to Disable other checkbox and select single

(0) ShareShare
ReportReport
Posted on by 428

Hi 

 

I have gallery and i want to select single checkbox and make all other checkbox disable and similar if i uncheck the box enable,

so user can select only one checkbox .

 

i have workaround where user can select single checkbox but then it does not allow me to deselect the one, i have to create separate button to reset ,

 

Tried below article but it does not work

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/Select-single-checkbox-within-a-Gallery/td-p/756528

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,293 Most Valuable Professional on at

    Hi @Ashok2 ,

    You have several checkboxes in the gallery - as an example with three, on the DisplayMode of CheckBox1

    If(
     CheckBox2.Value || CheckBox3.Value,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

    Do the same with the others referring to all other checkboxes (other than itself).

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Ashok2 Profile Picture
    428 on at

    @WarrenBelz 

    i have only one checkbox in my gallery which come with each item so behavior of each checkbox is same

  • WarrenBelz Profile Picture
    155,293 Most Valuable Professional on at

    @Ashok2 ,

    On the DisplayMode of the checkbox

    If(
     CountRows(
     Filter(
     YourGalleryName.AllItemns,
     CheckBoxName.Value
     )
     ) > 0
     &&
     !ThisItem.IsSelected,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )
    

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Ashok2 Profile Picture
    428 on at

    @WarrenBelz 

     

    Tryin  but getting below error

     

    Ashok2_0-1617698219913.png

     

  • WarrenBelz Profile Picture
    155,293 Most Valuable Professional on at

    @Ashok2 ,

    See corrected post (dangers of free-typing) - needs to be Gallery4.AllItems

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Ashok2 Profile Picture
    428 on at

    @WarrenBelz 

     

    Trying writing Gallery4.Allitems but unable to get all items getting same error 

    Ashok2_0-1617699178566.png

     

  • Verified answer
    WarrenBelz Profile Picture
    155,293 Most Valuable Professional on at

    OK @Ashok2 ,

    As mentioned free=typed without testing. It seems you cannot refer to a Gallery from inside it, so put this on a Label (I will call it CheckLabel here) and hide it

    CountRows(
     Filter(
     Gallery4.AllItems,
     Checkbox4.Value
     )
    ) > 0

     Now on the DisplayMode of the CheckBox

    If(
     CheckLabel.Text = "true" && !ThisItem.IsSelected,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     I have tested it and it works - you might also consider hiding the boxes (Visible true/false)

    DisableCheckbox.gif

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Why are the disabled options still checkable?

  • Dejvid87 Profile Picture
    7 on at

    This is how I do it and it works

     

    If(
    CheckLabel.Text = "true" && !Checkbox1_3.Value,
    DisplayMode.Disabled,
    DisplayMode.Edit
    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,033

#2
Valantis Profile Picture

Valantis 632

#3
11manish Profile Picture

11manish 607

Last 30 days Overall leaderboard