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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Validation if toggle i...
Power Apps
Unanswered

Validation if toggle is yes and no item is selected from the multi select dropdown

(0) ShareShare
ReportReport
Posted on by 23

Hello all,

 

I have a toggle for "Recurring Request". I have a multi select dropdown that has frequency (Monthly, Weekly etc.).

 

I want to validate if Toggle is On, The user must select at least one option before submitting the form.

 

Please help.

 

Regards,

nick

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

    Hi @Nick2020,

    You would use the UpdateContext() function to create a context variable using the OnCheck property of the toggle.

    UpdateContext({TogOn:true})

    and the OnUncheck property

    UpdateContext({TogOn:false})

    Then, for example,  you could use TogOn to control the visibility of a label instructing the user to make a choice from the Dropdown control.

    If you put 

    UpdateContext({TogOn:false})

    In the OnChange property of the dropdown control once the dropdown value was changed, the value of TogOn would be reset. 

    You could use TogOn to control the DisplayMode of the submit button and disable it unless your conditions are met.  An example would be putting this formula in its DisplayMode property.  

    If(TogOn && IsBlank(Dropdown1.Selected.Value),DisplayMode.Disabled,DisplayMode.Edit)

    There are many ways of playing with the context variable to alter the properties of various controls on your screen. 

  • v-xida-msft Profile Picture
    on at

    Hi @Nick2020,

    Could you please share a bit more about the Frequency Dropdown that you mentined? Is it a Combo Box control?

    Do you want to check/detect if the Toggle control is on, and at least one option has been selected within the Combo Box?

    Based on the needs that you mentioned, I think the If function could achieve your needs in PowerApps. I have made a test on my side, please take a try with the following formula:

    If(
    Toggle1.Value = true && !IsEmpty(ComboBox1.SelectedItems),
    "Type your submit form formula here"
    )

    Note: The ComboBox1 represents the Frequency Combo Box control within your app.

     

    Best regards,

  • Karth Profile Picture
    2 on at

    Thanks Drrickryp i spent nearly 4 hours in fixing similar issue. your post made me fix my app within 2 mins Thanks again Karth

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard