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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Advanced Query && ?

(3) ShareShare
ReportReport
Posted on by 2,459
When using the Advanced Filter on the "All Customers" form, adding a deaper table like "Responsibilities", and fitering where Worker is XXXX, YYYY the filter will give me all customers that have a responsibility worker as either XXXX OR YYYY.
 
Is it possible to change the OR to an AND ?
 
In short, I want to see all customers where any responsibility have the people XXXX and YYYY allocated as workers.
 
 
 
 
 
 
 
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Anton Venter Profile Picture
    20,345 Super User 2025 Season 2 on at
    No, it's not possible. A customization is required to achieve this.
  • Adis Profile Picture
    6,048 Super User 2025 Season 2 on at
    Hi,
     
    I dont get your request 100%...maybe I am just slow today.
     
    However, it works in such a way that every row that has a value is connected with an AND. So in your example, you should get records where
     
     
    Lead Sales person = XXXX AND Dept. Head is YYYY AND Account Manager is ZZZZ.
     
     

    Kind regards, Adis

     

    If this helped, please mark it as "Verified" for others facing the same issue

    Keep in mind that it is possible to mark more than one answer as verified

  • SU-22040800-0 Profile Picture
    2,459 on at
     
    ((AccountNum LIKE "US*") && (DirPartyTable.Name LIKE "Cont*"))
     
    And have even tried the D365 SQL Syntax, but unfortunately that did not work either.
     
    Does anyone know if there is a way (in the SQL Syntax) to not use "LIKE" and to use something like "GREATER THAN" or "LESS THAN" ?
  • Suggested answer
    Saalim Ansari Profile Picture
    666 on at
    Hii,
     

    No, it's not possible to change the OR condition to an AND condition across multiple child records like Responsibilities directly in the Advanced Filter of the All Customers form in Dynamics 365 Finance. This limitation exists because the filtering logic in the UI evaluates conditions per row. So when you filter by Responsibilities.Worker == XXXX OR YYYY, it checks each responsibility line, not all of them together. It cannot apply AND logic to check if both workers are present across different records for the same customer.

    To achieve this requirement—showing customers that have both workers XXXX and YYYY assigned in the Responsibilities—you’ll need to implement a workaround. One approach is to create a custom X++ query or job that uses exists logic to check if both workers are assigned to the same customer. Alternatively, you can use a temporary table or view that gathers all customers who meet both conditions, and then use that for further processing or display.

    Unfortunately, advanced SQL-style conditions like GREATER THAN or AND across multiple rows also do not work in the Advanced Filter UI for deeply related tables. These types of complex logic require custom development or reporting to achieve the desired results.

  • CU13020846-1 Profile Picture
    12 on at
    Thanks all for the responses!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans