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 / Change toggle field de...
Power Apps
Answered

Change toggle field depending on a dropdown field

(0) ShareShare
ReportReport
Posted on by 144

I have a dropdown field with the values:  Start, Wait, Stop

The default value of the Toggle control is : Off(false)

 

When i select "Stop" in the dropdown field, I need to change the value in the Toggle control to "On"(true), and if i select back to another value than "Stop" the toccle kontrol value should be set to Off.

 

Any idea how to change the toggle control value on a screen based  a value in the dropdown field ?

 

 

 

Categories:
  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @TrulsB 

    I've tested a solution for you.  Here's what you should do.

    Put the following code in the OnChange and OnSelect properties of your Dropdown control.

     

    Set(CheckStatus,false);
    If(Dropdown1.SelectedText.Value="Stop",
     Set(CheckStatus,true);Set(myToggleValue,true),
     Set(CheckStatus,true);Set(myToggleValue,false)
    )

     

    Change the Default property of your toggle control to this variable

     

    myToggleValue

    And finally put this variable into the Reset property of the toggle

     

    CheckStatus

     

    ---
    Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up." 

  • Jesus_Aguirre Profile Picture
    137 on at

    Hello, @mdevaney  how could I do the same but with an if inside a combobox with different parameters?

     

    Example: If(ComboBox1.Selected.item="Item 1"||"Item 2"||"Item 3",Set(varToggle,true),Set(varToggle,false));

     

    Because if I put it like this it only works with the first item.

    Can i help me please?

     

    Regards!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Very nice, depending on the dropdown result, can I also disable the Toggle?

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard