web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / OData query invalid - ...
Power Automate
Unanswered

OData query invalid - and or

(0) ShareShare
ReportReport
Posted on by 289

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?

JimJim_0-1622127879401.png

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']}

 

Categories:
I have the same question (0)
  • NiloferA Profile Picture
    on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 185 Super User 2025 Season 2

Last 30 days Overall leaderboard