Hi Guys,
I am trying to calculate who an approver should be in my approval flow.
If the current approval level is <= 3 I need to include Region in my filter, if the current approval level is > 3 I need to exclude Region in my filter. The following query is invalid. Is it possible to do what I am attempting in a single query?
Here is the actual filter code
Title eq '@{outputs('Get_approval')?['body/BusinessUnit']}' and (Region eq '@{outputs('Get_approval')?['body/Region']}' or @{outputs('Get_approval')?['body/ApprovalLevel']} gt 3) and Approval_x0020_Level_x0020_Fleet eq @{outputs('Get_approval')?['body/ApprovalLevel']} and Max_x0020_Approval_x0020_Value_x gt @{outputs('Get_approval')?['body/TotalValueUSD']}
Hello @JimJim ,
You can try this,
Title eq '@{outputs('Get_approval')?['body/BusinessUnit']}' and ((Region eq '@{outputs('Get_approval')?['body/Region']}' and @{outputs('Get_approval')?['body/ApprovalLevel']} gt 3 and Approval_x0020_Level_x0020_Fleet eq @{outputs('Get_approval')?['body/ApprovalLevel']} and Max_x0020_Approval_x0020_Value_x gt @{outputs('Get_approval')?['body/TotalValueUSD']}) or (Approval_x0020_Level_x0020_Fleet eq @{outputs('Get_approval')?['body/ApprovalLevel']} and Max_x0020_Approval_x0020_Value_x gt @{outputs('Get_approval')?['body/TotalValueUSD']}))
If you still get an invalid query error, try to check that you are enclosing all the text values in single quotes 'your value here'
Please give a Kudo if you found this helpful or Accept this Reply as Solution if it solved your problem