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 / Edit Form / Save Butto...
Power Apps
Answered

Edit Form / Save Button / Toggle Datacards

(0) ShareShare
ReportReport
Posted on by 394 Super User 2024 Season 1

Dear All,

 

I have an edit form with three toggle data cards and a save button which submits form.

 

I need to validate it and only allow one toggle to be true, how is best to do this, maybe on the save button?

 

Do you have some code for this and to output a message to a label?

 

Kind Regards

 

Daniel

Categories:
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @DLCaterhamSch 

     

    You can achieve that by adding the toggles to a filter through a table:

    If(
     CountRows(Filter([Toggle1.Value, Toggle1_1.Value, Toggle1_2.Value], Value = true)) >= 1,
     "Only one toggle can be true",
     "Please select one of the three toggles"
    )

    SpongYe_0-1700822569980.png

    SpongYe_1-1700822593350.png

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

     

     

     

  • DLCaterhamSch Profile Picture
    394 Super User 2024 Season 1 on at

    Do i need to add this formula to the label? If so is this in the text part?

  • DLCaterhamSch Profile Picture
    394 Super User 2024 Season 1 on at

    How would I add this to alert when clicking the save button?

  • Verified answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    You can add the code to the OnSelect property of the save button.

    If(
     CountRows(Filter([Toggle1.Value, Toggle1_1.Value, Toggle1_2.Value], Value = true)) > 1,
     Notify("Only one toggle can be true", NotificationType.Error),
     SubmitForm(FormName)
    )
  • DLCaterhamSch Profile Picture
    394 Super User 2024 Season 1 on at

    I also need it so that if no options are selected it errors? How would I do this?

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard