cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Switch Case Based on Drop Down Value

Hi, 

 

I have a flow that will have a switch case dependent on drop down value in power apps. 

 

i.e Groups can data science or informtion management to choose from.

 

Based on the value selected the flow will complete a switch case and add the user into the group. 

 

I have run my flow andt he value in the switch,( based on the varriable delcarled earlier)  keeps skipping even if the selection equals the correct value 

 

I have seen posts about the advance expression but how would this statement be written for a dropdown value. 

 

flow33.PNGFlow34.PNG

6 REPLIES 6
Highlighted

Re: Switch Case Based on Drop Down Value

In the run output can you check the value of your variable ( by opening the variabale setting just above the switch).

 

In my case below the choice field returs a strucutre and I needed to get the value of the choice rather than the choice itself.

 

 

ChoiceField.PNG

 

Highlighted
Helper III
Helper III

Re: Switch Case Based on Drop Down Value

HI 

 

I have looked at the varriable being logged value and it was blank from the drop down selected in the power app. 

 

The varriable is setting the drop down to a string. Is that what yours is passing through?

 

In power apps the onselect value to pass through is PowerAppsbutton.Run(COPGroups.Selected.Value)

 

 

 

 

 

Highlighted

Re: Switch Case Based on Drop Down Value

In my case I simulated a similar thing wihtout the PowerApps.

 

Within Powerapps you could now add a control next to the button and set this to COPGroups.Selected.Value

 

That wikl tell you the value of the data in Powerapps.

 

So imaghine that you have a gallery with data and the button is sending the current item across. Then try to have a text control and set this to Gallery1.Selected..... (in your case probably COPGroup.Selected.....)

 

 

TextPA.PNG

That way you can see what you are sending to Flow.

Highlighted
Helper III
Helper III

Re: Switch Case Based on Drop Down Value

Hi 

 

I have created a new text box as you have suggested, calling it the name of COPGroups.Selected.Value

 

However the value didnt get passed through as your suggesting once you select an item from the drop down, it showed as blank 

 

To pass through information of the dropdown is it correct as shown?

 

I have added the screen shots below.

 

Capture20.PNGCapture40.PNG

Highlighted

Re: Switch Case Based on Drop Down Value

This is indeed strange. 

 

I created the same as you and my label field is being updated.

 

ValuePA.PNG

 

I set the Text value to Dropdown1.Selected.Value and all seems to be ok. 

As this issue is a PowerApps rather than flow issue you might want to log it within the PowerApps community site ratherr than the flow one.

 

Can you try creating a new PowerApp and create a new dropdown and a new label and then test the same again.

 

Highlighted
Helper III
Helper III

Re: Switch Case Based on Drop Down Value

Hi, 

 

Silly question where did you set the value to Dropdown1.Selected.Value?

 

Thanks

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (7,407)