cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Mutually exclusive choices

I have a form with three on/off sliders. I want to ensure that only one of these is set, so that when one is turned on the other two are set to off. It is okay for all to be off. I expect I could put a function in the OnCheck property of each slider, but how do I set the value of another datacard?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Here is a small video: 

Toggles.gif

If so, here are the values I have: 

  1. Toggle1
    • OnCheck: Set(toggle2Default, false); Set(toggle3Default, false); Reset(Toggle2); Reset(Toggle3)
    • Default: toggle1Default
  2. Toggle2
    • OnCheck: Set(toggle1Default, false); Set(toggle3Default, false); Reset(Toggle1); Reset(Toggle3)
    • Default: toggle2Default
  3. Toggle3
    • OnCheck: Set(toggle1Default, false); Set(toggle2Default, false); Reset(Toggle1); Reset(Toggle2)
    • Default: toggle3Default

Let me know if this works. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  1.  

View solution in original post

7 REPLIES 7
Super User III
Super User III

Hi @DustyMac 

Do  you want to set the defaults of the dependent sliders (ie change them but still let the user make a choice) or do you want to disable them based on the choice in the first slider and prevent the user from changing them..

Super User II
Super User II

Here is a small video: 

Toggles.gif

If so, here are the values I have: 

  1. Toggle1
    • OnCheck: Set(toggle2Default, false); Set(toggle3Default, false); Reset(Toggle2); Reset(Toggle3)
    • Default: toggle1Default
  2. Toggle2
    • OnCheck: Set(toggle1Default, false); Set(toggle3Default, false); Reset(Toggle1); Reset(Toggle3)
    • Default: toggle2Default
  3. Toggle3
    • OnCheck: Set(toggle1Default, false); Set(toggle2Default, false); Reset(Toggle1); Reset(Toggle2)
    • Default: toggle3Default

Let me know if this works. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  1.  

View solution in original post

My apologies @Drrickryp. When I started writing up the response, there were no replies, didn't mean to reply on top of yours. 

 

Thanks,

Hardit Bhatia

On reflection, I have been thinking it may be simpler to disable each slider based on whether either of the other two are on, since they all default to the off position. This may also be simpler.

This looks exactly like what I want, but when I implement it I get an error: "The function 'Reset' has some invalid arguments."

My bad, I wasn't clear on what was being reset. It's all good now, thanks

Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

 

Thanks,
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,138)