cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos

Nesting several logic statements in one expression.

Dear Team,

 

I have a multi step approval flow (4 sequencial approvals) connected to a SharePoint list triggered by For Selected Item.

The second approval assignee needs to be determined by a value set in one of the mandatory fields in the item (from a drop down). I have come part way to resolved this by using an IF expression. However Flow does not support nested logic. This is a limitation if there are more than 2 conditions required as is in my case, I have 3. Project A, Project B or Project C.

The remaining approvals are the same regardless of the project value. The only way around this is to use a switch case and repeat all the actions for each case which is a tedious process and prone to error.

 

I would like to suggest that Flow should be able to support multiple nested IF statements e.g. as follows:

 

if(equals(body('UpdateItemReview')?['Project']?['Value'],'Project A'),'test1@outlook.com,if(equals(body('UpdateItemReview')?['Project']?['Value'],'Project B'),'test2@outlook.com',test3@outlook.com'))

This would save a considerable amount of time and reduce errors and reduce maintainenance.

 

Alan

Status: New
Labels
>