web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Mutually exclusive cho...
Power Apps
Answered

Mutually exclusive choices

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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?

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

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

  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    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.  
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 316 Most Valuable Professional

#2
11manish Profile Picture

11manish 242

#3
Valantis Profile Picture

Valantis 198

Last 30 days Overall leaderboard