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 / If there are several c...
Power Apps
Answered

If there are several checkboxes, only one may be clicked at a time - How?

(1) ShareShare
ReportReport
Posted on by 775

Hi All,

 

I have the following question:

I am currently building an application and there are also some clickable checkboxes. But now I want only one of the three to be clickable. (See image below) When one is clicked and an attempt is made to click another, the checkmark disappears from one and appears in the other. Important: At the end only one checkbox may be clicked at a time!

 

PowerSm_0-1629890183605.png

 

I hope my request was not too difficult to understand.

 

Thanks in advance for your help.

Categories:
  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey!

    On OnCheck set 2 vars. For example, on the first one, Set(varHotel; true);; Set(varHotelbuchung; true)

     

    Then, on display of the other other 2 write:

    If(varHotel = true; DisplayMode.Disabled; DisplayMode.Edit)

    Do that for the 3, just change the vars

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @PowerSäm ,

     

    You can try below code if it helps

    Checkbox Option1 Default:Option1
     OnCheck: Set(Option1,true);Set(Option2,false);Set(Option3,false)
    
    Checkbox Option2 Default:Option1
     OnCheck: Set(Option1,false);Set(Option2,true);Set(Option3,false)
    
    Checkbox Option3 Default:Option1
     OnCheck: Set(Option1,false);Set(Option2,false);Set(Option3,true)

     

    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.

  • PowerSäm Profile Picture
    775 on at

    @Nogueira1306 @PriyankaGeethik 

     

    Thanks a lot to both of you for the quick answers!
    Both ways work fine! Thank you!

     

    @PriyankaGeethik You would have to improve only one small thing, then it works excellently: After Defaults must stand in each case option 1, then option2 and then option3 there and not everywhere option1.

    Like this.

     

    Checkbox Option1 Default:Option1
     OnCheck: Set(Option1,true);Set(Option2,false);Set(Option3,false)
    
    Checkbox Option2 Default:Option2
     OnCheck: Set(Option1,false);Set(Option2,true);Set(Option3,false)
    
    Checkbox Option3 Default:Option3
     OnCheck: Set(Option1,false);Set(Option2,false);Set(Option3,true)

     

    If you improve it, I can accept it as a solution.

     

    Thanks again!

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @PowerSäm 

    These are clever solutions but it is much simpler to use a radio control.  All this functionality is already built in.

  • Verified answer
    PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @PowerSäm ,

     

    Missed to update that 😅. Thanks for correcting 

    Below is the updated code. 

     

    Please see the updated code. 

    Checkbox Option1 Default:Option1
     OnCheck: Set(Option1,true);Set(Option2,false);Set(Option3,false)
    
    Checkbox Option2 Default:Option2
     OnCheck: Set(Option1,false);Set(Option2,true);Set(Option3,false)
    
    Checkbox Option3 Default:Option3
     OnCheck: Set(Option1,false);Set(Option2,false);Set(Option3,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 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard