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

Issue with too many conditions

I have a help ticket form that my users fill out, and depending on what division/department they select, will determine who the authorization will need to go to.  SO, I tried doing conditions on this, with setting a variable up.  WELL, I've found out you can only nest up to 8 conditions, how do you suggest I set this up.  I'm new to doing flow, so, this was my first thought on how to do this, what are others ideas? 

 

Here is the scenario:

 

I'd do a condition, if Department is Accounting, then, the condition is true and it will go to Jim Smith, so, I'd set the variable up to be the email address for Jim Smith and then proceed on, if not, then, in the NO, I'd do another condition, and say, if Deparment is "IT Reporting", then, the condition is true and it would go to Bill Smith, so, I'd set the variable up to be the email address for Bill Smith and proceed on and so on and so forth.  I have like 12 of these departments.  I'm guessing there is an easier way, but, I just don't know how at the moment to do it in flow.

 

Please advise.

 

Thanks, Shawnna

8 REPLIES 8
sudharsan1985
Super User
Super User

Hi @srmcmains 

If the below flow is used with SharePoint, you can create a list with configurations like the department and the approvers. Then based on the department, you can pick the users from the list and then send the actions to the approver.

 

Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
-Sudharsan K...

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...
Pstork1
Dual Super User III
Dual Super User III

If you are always testing for the department, but with different values you can replace your If() statements with a Switch(). The switch statement will choose a different branch based on the value you are checking.

screen3.png



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

Hi @srmcmains & @Pstork1 

The reason why I suggested the SharePoint list is in-case if there is any update to the approves in the department or if you want to add more than one approves, then you can simply change the value in the list without having to update the flow.

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...
RobElliott
Super User
Super User

@srmcmains a switch based on case department = IT or department = Marketing etc is definitely the way to do this providing the number of "cases" is less than or equal to 27 as I recall that is the limit. After that you need to have sub-switches.

Rob
Los Gallardos


-Sudharsan K...

 

If I do the sharepoint list, would that be a different sharepoint list that I would point to?

Hi
The list i mentioned would be for maintaining the department and approvers mapping. So it should be a diff list.
Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

How do I grab this "second" list from the flow?

Hi
You can use 'Send Http Request To SharePoint' action and then REST api to filter the item based on the depqrtment and pass the output to the following action.
Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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