Re: Multi-level Condition on Option Sets
Thank you
This is helpful in that we can frame the scenarios in a switch. The main challenge is actually evaluating against the underlying option set values in CDS. For example in this one scenario, here would be the possible combinations: There are three other scenarios which would multiply these expressions by 5 in total.
1. Sales Stage and Sales Stage-Commercial are BOTH at Stage 2 or less. Should get notice.
If (Sales Stage 0 && 0-Sales Stage-Commercial - 0). Should fail
If (Sales Stage 0 && 1-Sales Stage-Commercial - 1). Should fail
If (Sales Stage 0 && 2-Sales Stage-Commercial - 2). Should fail
If (Sales Stage 1 && 0-Sales Stage-Commercial - 0). Should fail
If (Sales Stage 2 && 0-Sales Stage-Commercial - 0). Should fail
If (Sales Stage 1 && 1-Sales Stage-Commercial - 1). Should fail
If (Sales Stage 2 && Sales Stage-Commercial - 2). Should fail
By Stage 2 or less, we are evaluating the two option set values as if they are in a *range or *sequence, but PowerApps does not intuitively compare and evaluate all the given values in an option set as a range.
So in theory, based on your suggested formula it would be something like this; I wonder if there is a clean way to accomplish this, so all the expressions do not become extensive in length.?
Thank you and appreciate your contribution!
Switch( If (Sales Stage equals 0(*option set value) & Sales Stage-Commercial equals 0(2nd *option set value), Notify(...), defaultresult )