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, ...
Answered

How to create data entity with range and "or" condition ?

(1) ShareShare
ReportReport
Posted on by 195
Hello,
 
When we create data entity, how to add range but with 'OR' condition. Is this possible ?
The data entity is for OData, and I want to fixed it into certain condition.
 
For example I've created new data entity for Sales Table like this:
 
I have condition in CustGroup to be /MEMBER/:
 
and IncTax to be Yes:
 
When checking in SSMS, I found the condition created is /AND/
 
Is it possible to have 'OR' condition ?
Similarly if I want the OR condition is between 2 data source in this data entity. So for example I'll added other table relates to SalesTable. So, 1 range in Sales Table, and 1 range in this other table, but it is 'OR condition.
Thanks.
 
 
I have the same question (0)
  • Verified answer
    Layan Jwei Profile Picture
    8,118 Super User 2025 Season 2 on at
    Hi Tony,

    For complex entity ranges, you can create a computed column that returns 0 or 1.
    So i think what you are trying to achieve is sth like this:

     if (SalesTable.CustGroup = 'Member' OR SalesTable.InclTax = Yes OR Table1.Field = sth)
    so this computed column should return 1 if the above condition is met, else it should return 0

    https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/data-entity-computed-columns-virtual-fields#example-create-a-computed-field
     
     
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future. You can do this by ticking the box "Does this answer your question"
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,187 Super User 2025 Season 2 on at
    Hi Tony,
     
    You can include the Record ID field as range and use an SQL expression for defining the OR condition in the range value. You can read more on this page: Advanced filtering and query syntax - Finance & Operations | Dynamics 365 | Microsoft Learn
     
    Instead of the documentation example
     
    ((AccountNum LIKE "US*") && (DirPartyTable.Name LIKE "Cont*"))
     
    you can use
     
    ((AccountNum LIKE "US*") || (DirPartyTable.Name LIKE "Cont*"))
  • Voltes Profile Picture
    195 on at
    Thank you, both.
     
    It works. 
  • Voltes Profile Picture
    195 on at
    Sorry I cannot Mark this as solved -> "Does this answer your question" check box since it is always freezing, endless processing.
    I wonder why with this new UI, it is difficult to operate. 
     
    Btw, I tried both:
    - with Andre suggestion... it is easier but to trace back is harder because someone else may not aware there's a range condition.
    - with Layan suggestion... it is more complex, but because there is a visible column, it is easy to trace back later.
     
    I want to check both. Thanks.
  • Kevin Xia Profile Picture
    Microsoft Employee on at
    Hi,
    You can refer to this official documentation: Data entities overview - Finance & Operations | Dynamics 365 | Microsoft Learn.This article defines and provides an overview of data entities. It includes information about the capabilities of data entities, the scenarios that they support, the categories that are used for them, and the methods for creating them.
    Best regards,
    Kevin
  • Kevin Xia Profile Picture
    Microsoft Employee on at
    Hi,
    I've helped you mark this as solved.
    Best regards,
    Kevin

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans