cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Switch Action for large values

I am creating a flow and I need to apply a switch to the string coming from a drop down value in a SharePoint list column.

Columns has 10 values and I want to get index of each value.

 

one option is to apply a switch and then set the value in a variable. In this case I will be creating cases and assign the value but is there any other way?

 

sa105_1-1606110888095.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @sa105 ,

 

The Switch action can be simplified to multiple If statement in Set Variable action as below .

 

if(equals(variables('consequence'),'Insignificant'),1,
if(equals(variables('consequence'),'Minor'),2,
if(equals(variables('consequence'),'Other Option'),3,null)))

 

Hope this helps.

Sik

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @sa105 ,

 

The Switch action can be simplified to multiple If statement in Set Variable action as below .

 

if(equals(variables('consequence'),'Insignificant'),1,
if(equals(variables('consequence'),'Minor'),2,
if(equals(variables('consequence'),'Other Option'),3,null)))

 

Hope this helps.

Sik

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (12,508)