cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Checkboxes: Automatically uncheck checkbox when another is checked.

I have cuztomised the forms for a SharePoint list.  One of my fields is a multi select choice field, which in order to display on the form I have converted to several checkboxes, using this MS blog. https://powerapps.microsoft.com/en-us/blog/multivaluedchoicesinforms/ .  When the form is saved the value against each checkbox selected is saved back to the SP list field separated by commas.  Great.

 

The available options I have include; No(Default selected option), Option A, Option B.  I now need to add functionality so that if either Option A or B are checked then 'No' is unchecked.  I have tried updating the OnCheck property for Option A & B to "OnCheck = Checkbox_No = false" which doesnt show any errors but also doesnt seem to trigger when these options are checked in the form.  I have seen some other posts that include createing context variables and using the Default property, however I already use the Default property to post back to the list (see link for MS blog above) and not sure how to include this functionality with what I already have in there.

 

Any help would be great 🙂

2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @Anonymous,

 

You could set the DisplayMode property of this No checkbox to:

If(Checkbox_OptionA.Value Or Checkbox_OptionB.Value,DisplayMode.View,DisplayMode.Edit)

Capture.PNG

 

But this only works if you do not check No first. So after quite a lot of research and test, I think this cannot be done. You want the default be the exsiting value while editng a item, and you also want to uncheck the No when other 2 are checked. This is not possible so far.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for your reply @v-monli-msft!  

 

I have not intentionally set the 'No' checkbox to be selected by default, this seems to have been auto set because 'No' is the first option i have defined in the related list field.  Do you know if there is a way for this not to be the case?  I dont think its necessary for any to be preselected.

 

Eve

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (21,536)