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
  • Suggested answer
    YUN ZHU Profile Picture
    104,157 Super User 2026 Season 2 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
    104,157 Super User 2026 Season 2 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 624 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 440 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 244 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans