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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,391)