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

Data entity (Non exist join)

(0) ShareShare
ReportReport
Posted on by 3,252
Hi All,
 
I am trying to achieve this query

{SELECT FIRSTFAST * FROM DimAttributeOMCostCenter(ds) ORDER BY DimAttributeOMCostCenter.Value ASC NOTEXISTS JOIN 'x' FROM DimensionAttributeValueLedgerView(DimensionAttributeValueLedgerView_1) WHERE DimAttributeOMCostCenter.Key = DimensionAttributeValueLedgerView.EntityInstance  /
 
using Data entity. How can I achieve this? I tried it but when I see the design from sql it is return this:
 
/SELECT   T1.RECID AS KEY_, T1.OMOPERATINGUNITNUMBER AS VALUE, T1.PARTITION, T1.RECID, T2.NAME, T2.PARTITION AS PARTITION#2
FROM     dbo.DIRPARTYTABLE AS T1 INNER JOIN
             dbo.DIRPARTYTABLE AS T2 ON T1.RECID = T2.RECID AND T1.PARTITION = T2.PARTITION
WHERE   (T1.OMOPERATINGUNITTYPE = 2) AND (NOT EXISTS
                 (SELECT   TOP (1) ' x ' AS Expr1
                 FROM     dbo.DIMENSIONATTRIBUTEVALUELEDGERVIEW AS T3
                 WHERE   (ISSUSPENDED = 1) AND (T1.RECID = ENTITYINSTANCE) AND (T1.PARTITION = PARTITION))) AND (T1.INSTANCERELATIONTYPE IN (10781))/
 
 
Any hint?
 
 
 
  • Bharani Preetham Peraka Profile Picture
    3,524 Moderator on at
    Data entity (Non exist join)
    You need a data entity same like the first query. So You can simply create a data entity with those datasources and join them as per relation. If data entity is showing different as shown in the 2nd select query, then can you tell us why Dirpartytable is added? Also, we can give more information if you give us more details about the data entity how it is built.
  • Suggested answer
    Umesh Pandit Profile Picture
    9,033 on at
    Data entity (Non exist join)
    Your initial query is a bit complex due to the NOTEXISTS JOIN and the aliasing of the joined table. To achieve this using a Data Entity, you'll need to follow the standard patterns for creating queries in Data Entities.

    In this case, you would create a custom Data Entity based on the table DimAttributeOMCostCenter and then add a data source that joins with the DimensionAttributeValueLedgerView based on your conditions.
  • André Arnaud de Calavon Profile Picture
    283,862 Test role Public on at
    Data entity (Non exist join)
    Hi Waed,
     
    Can you explain functionally what you want to achieve? Is this query the data entity query itself or would you need this for a calculated field? What exact output are you expectting and what is the current behavior?

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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

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

#1
Jahanvi Profile Picture

Jahanvi 35

#2
PJ JohnPaul Profile Picture

PJ JohnPaul 5

#3
Anton Venter Profile Picture

Anton Venter 4 Moderator

Product updates

Dynamics 365 release plans