cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kit1128
Helper III
Helper III

Only one checkbox can be selected

HI GUYS,

 

I've two question about the checkbox

 

1. I want to make the individual checkbox that means only one checkbox can be selected. E.g checkbox A is selected, then checkbox B will uncheck

2. How can clear the checkbox in form when change the page

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User
Super User

Try this:

Question1

You can use the DisplayMode of the checkbox:

   checkboxB

  If(checkboxA.Value=true,DisplayMode.Disabled,DisplayMode.Edit)

 

checkboxA

  If(checkboxB.Value=true,DisplayMode.Disabled,DisplayMode.Edit)

 

Question2

OnUnCheck of the CheckBox:

If(ThisItem.ID exactin MyColl.ID,
Remove(MyColl, LookUp(MyColl,ID=ThisItem.ID)))
You can replace ID with any unique column of your table
 

View solution in original post

6 REPLIES 6
eka24
Super User
Super User

Try this:

Question1

You can use the DisplayMode of the checkbox:

   checkboxB

  If(checkboxA.Value=true,DisplayMode.Disabled,DisplayMode.Edit)

 

checkboxA

  If(checkboxB.Value=true,DisplayMode.Disabled,DisplayMode.Edit)

 

Question2

OnUnCheck of the CheckBox:

If(ThisItem.ID exactin MyColl.ID,
Remove(MyColl, LookUp(MyColl,ID=ThisItem.ID)))
You can replace ID with any unique column of your table
 

HI @eka24 ,

Thanks for reply. I think that's not quite what i want, as I just want to ticking one of checkbox, then another checkbox immediately unticks.

Are you refering to 1 or 2

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 

Referring question1

Consider the approach I gave, which will acheive same result, a user cannot check 2 checkboxes at the same time. One has to be unchecked before a new selection could be made.

It also avoids circular referencing.

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

@eka24 

Thank you very much for solve my question. 😁

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (2,259)