cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Digital
Impactful Individual
Impactful Individual

Multiple matches in switch statement evaluate to same result

I've looked in the documentation which lists the general format of a switch statement as follows: 

 

SwitchFormulaMatch1Result1 [, Match2Result2, ... [, DefaultResult ] ] )

 

I want to be able to have multiple matches that produces the same match result

 

SwitchFormulaMatch1Match2, Match3, Result1 [, Match4Result4, ... [, DefaultResult ] ] )

 

Does anyone know if this already possible?

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@Digital 
This is already possible by writing an IF statement.  It is not the purpose of SWITCH.

If(
    Condition1=true Or Condition2=true Or Condition3=true, Result1,
    Condition4=true, Result2
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

2 REPLIES 2
mdevaney
Super User
Super User

@Digital 
This is already possible by writing an IF statement.  It is not the purpose of SWITCH.

If(
    Condition1=true Or Condition2=true Or Condition3=true, Result1,
    Condition4=true, Result2
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Digital
Impactful Individual
Impactful Individual

Hey @mdevaney ,

 

Thanks for the reply, I know I can do that with an If statement but other languages allow switch using multiple matches evaluating to same result. I suppose it's a nice to have rather than something that is necessary.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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