cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DustyMac
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
PowerAddict
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
Drrickryp
Super User II
Super User II

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..

PowerAddict
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
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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,568)