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

Switch Case with and/or

Hello,

 

I need to test in one case multiple values ? On one branch of SWITCH, CASE can be 'A' or 'B' or 'C'. I have tried different syntaxes but unsuccessfully :  'A', 'B', 'C' or or('A', 'B', 'C'). Is it possible ?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User III
Dual Super User III

Each case in a switch statement can only have one value.  So you'll need to have a separate branch for each specific value or if there is only one branch like that you can use a condition statement in the default case.  But there is no way to add multiple values to an individual case.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Super User III
Super User III

You can use the "or" operator. To do what you want. Flesh out the information a bit better and we can help you build the expression.

Dual Super User III
Dual Super User III

Each case in a switch statement can only have one value.  So you'll need to have a separate branch for each specific value or if there is only one branch like that you can use a condition statement in the default case.  But there is no way to add multiple values to an individual case.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

I modified the code. I added one conditional test before the SWITCH who set up a variable and i'm testing this variable in the SWITCH

 

flow2.jpg

 

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 (3,304)