I am trying to build a flow that kicks off an email based on a sharepoint site. My problem is the number of nested conditions I can use is limited to 5.
My flow is pretty simple - I have a choice field on my Sharepoint list. The choice made should direct where the email goes to.
So it looks like:
Condiiton 1
Choice A ->
Yes -> choicea@x.com
No ->
Condition 2
Choice B ->
Yes -> choiceb@x.com
No ->
Condition 3
Choice C ->
.....
But I can't get all my choices in this nested condition because I have more than 5 to choose from.
There has to be a better way to do this but I am too new to the product to find it. Can anyone provide some direction?
Thanks
Solved! Go to Solution.
Hi jf82,
Have you tried with Switch Case feature?
Flow supports nested conditionals, which make it possible to have very advanced branching logic. Switch case makes it very easy to have parallel branches of conditional logic based on a single value.
You can find switch by selecting the More ... option after selecting New Step and then choosing Add a Switch Case. Inside a Switch Case you will select a value from the trigger or a previous step to switch on. For example, if you use this template for a SharePoint approval flow, the switch is on the option the approver selects in the approval email.
Please go ahead and try to use switch case instead. Let me know if this works for you.
Regards,
Mona
Hopefully someone will respond to this one, as I am running into the same issue. Although, I would love to limit my initial list results or use 'AND' 'OR' functionality to prevent the need for having so many conditions.
Hi jf82,
Have you tried with Switch Case feature?
Flow supports nested conditionals, which make it possible to have very advanced branching logic. Switch case makes it very easy to have parallel branches of conditional logic based on a single value.
You can find switch by selecting the More ... option after selecting New Step and then choosing Add a Switch Case. Inside a Switch Case you will select a value from the trigger or a previous step to switch on. For example, if you use this template for a SharePoint approval flow, the switch is on the option the approver selects in the approval email.
Please go ahead and try to use switch case instead. Let me know if this works for you.
Regards,
Mona
This is perfect and allowed me to do what I was hoping for. I wasn't aware of this function but it let me do exactly what I needed,
Thank you.
Switch case usually requests to know what something is "equal" to. Has anyone come across a need to use a switch case but want the choice to be something that just "contains" a certain string/value?
ie: if 'jobTitle' contains "manager" do A. If 'jobTitle" contains "chief" do B. If 'jobTitle' contains "Director" do C.
I am also running into the same limitation. I humbly offer the solution found in the post linked below to create a workaround, although this secret hard-limit is really a pain. Hopefully someone from MS sees this and takes the initiative to fix a problem for more advanced Flow implementation:
https://powerusers.microsoft.com/t5/Building-Flows/Multiple-Flow-Conditions/td-p/117671
Solution: Created condition with expression values on each side of the operator. My example:
Expression -
and(equals(triggerBody()?['TYPE_x0020_OF_x0020_INSTALL']?['Value'], 'SHOP'), equals(triggerBody()?['INSTALL_x0020_STATUS']?['Value'], 'INSTALLED'))
Operator -
Equals
Expression -
true
Regards,
Alex
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
39 | |
37 | |
36 | |
33 | |
28 |
User | Count |
---|---|
39 | |
38 | |
31 | |
28 | |
23 |