cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rdarrasUM
New Member

Control Value of Dropdown based on Toggle

I'm still pretty new to PowerApps and I was wondering if it was possible to control the value of a dropdown using a toggle.

Here is a screenshot for reference:

toggle dropdown issue.PNG

 

 

 

 

 

The value inside the dropdown are 0, 1, 2.

When the toggle is off, I would like the dropdown value to be 0 and not editable

When the toggle is on, it can be any of the three values.

I've attempted numerous times to get it working without any success so I'm now turning to the community for your assistance.

Doesn't seem like it should be this complicated but I can't seem to find the right combination for some unknown reason.

I'll be sure to mark your solution as accepted for whoever helps me find the solution.

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
TheRobRush
Impactful Individual
Impactful Individual

Here I place a toggle, Toggle1 with the onchange

 

If(Toggle1.Value=true,Set(toggleVar,"protectedoff"),Set(toggleVar,"protectedon"));
Reset(Dropdown5)

 

I have a dropdown, dropdown5 with items [0,1,2,3] default set to 0

it's displaymode set to

 

If(toggleVar="protectedoff",DisplayMode.Edit,DisplayMode.View)
_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

View solution in original post

2 REPLIES 2
TheRobRush
Impactful Individual
Impactful Individual

Here I place a toggle, Toggle1 with the onchange

 

If(Toggle1.Value=true,Set(toggleVar,"protectedoff"),Set(toggleVar,"protectedon"));
Reset(Dropdown5)

 

I have a dropdown, dropdown5 with items [0,1,2,3] default set to 0

it's displaymode set to

 

If(toggleVar="protectedoff",DisplayMode.Edit,DisplayMode.View)
_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

View solution in original post

Worked like a charm @TheRobRush, thank you very much for your assistance!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,181)