cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
TrulsB
Level: Powered On

Change toggle field depending on a dropdown field

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 ?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Level 8

Re: Change toggle field depending on a dropdown field

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

View solution in original post

1 REPLY 1
mdevaney
Level 8

Re: Change toggle field depending on a dropdown field

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

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 217 members 5,588 guests
Please welcome our newest community members: