I've looked in the documentation which lists the general format of a switch statement as follows:
Switch( Formula, Match1, Result1 [, Match2, Result2, ... [, DefaultResult ] ] )
I want to be able to have multiple matches that produces the same match result
Switch( Formula, Match1, Match2, Match3, Result1 [, Match4, Result4, ... [, DefaultResult ] ] )
Does anyone know if this already possible?
Solved! Go to Solution.
@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."
@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."
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.
Hi,
This is possible by using a ";" between your matches.
So:
Switch( Formula, Match1;Match1b;Match1c, Result1 [, Match2, Result2, ... [, DefaultResult ] ] )
gr
Wim
Hi @wbroens. Is that a new feature? Its not working yet for me in authoring version 3.22061.6.
For some reason it is not working for me now. I think I was mistaken and made wrong assumption it worked.
User | Count |
---|---|
165 | |
90 | |
72 | |
64 | |
62 |
User | Count |
---|---|
210 | |
152 | |
96 | |
86 | |
66 |