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 III
Super User III

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 III
Super User III

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

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.

eka24
Super User III
Super User III

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

eka24
Super User III
Super User III

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,674)