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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Filter a query with OR

(1) ShareShare
ReportReport
Posted on by 29
Good afternoon
 
I have made a query on Purchase Header table in Query Designer in NAV 2018
 
Is it possible to filter this on two criteria?
Ie, include if Location Code = X, OR Responsibility Center = Y?
 
I suspect that using two filters will always result in AND logic. Do any other users know if OR is possible?
 
Thank you 
 
 
AND.jpg
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    98,242 Super User 2026 Season 1 on at
    Hi, hope the following helps.
    Dynamics 365 Business Central: Cross-column search (OR filters on multiple fields) ★FilterGroup(-1)
     
    Thanks.
    ZHU
  • Lovisa LH Profile Picture
    29 on at
    Dear Zhu
     
    I was hoping you would have some advice, and this gives me hope for when we go into Dynamics 365, thank you.
    But right now, I am using NAV 2018
     
    Does anyone have any idea if I can create a query with 2 filters to achieve  purchase lines with
    Responsibility_Center=CONST(FCL)
    OR
    Location_Code=FILTER(2250..9900)
     
    Thank you
     
  • Verified answer
    YUN ZHU Profile Picture
    98,242 Super User 2026 Season 1 on at
    Hi, Unfortunately, as far as I know, this is not possible.
    Unless you insert the Query data into the table, you cannot use OR filtering.
    PS: Dynamics 365 Business Central: Using the query as a data source for a page (Query.Open Method)
    Query.SetFilter(Any, Text [, Any,...]) Method
     
    Thanks
    ZHU
  • Lovisa LH Profile Picture
    29 on at
    Thank you Zhu and have a nice day!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,055 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,063 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 1,014 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans