Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

SQLJoinType Not Working as expected

(2) ShareShare
ReportReport
Posted on by 61
Why in below code SQL Join now working when I add DataItemTableFilter Property.
 
Please some one explain. and what is the workaround for same.
 
dataitem(CGST_LE; "Detailed GST Ledger Entry")
                {
                    DataItemLink = "Document Line No." = Purch__Inv__Line."Line No.",
                                   "Document No." = Purch__Inv__Line."Document No.",
                                   "GST Group Code" = Purch__Inv__Line."GST Group Code";
                    SqlJoinType = LeftOuterJoin;
                    // DataItemTableFilter = "GST Component Code" = Const('CGST');
                    column(GST_Amount; "GST Amount") { Method = Sum; }
 
  • Verified answer
    gdrenteria Profile Picture
    gdrenteria 14,758 Most Valuable Professional on at
    SQLJoinType Not Working as expected
  • SQLJoinType Not Working as expected
    Why I try to apply Filter (*Refer Commented Line)  inside data item, Resulting records are only those where filter condition is true, except all records from outer table are not shown.
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 78,198 Super User 2025 Season 1 on at
    SQLJoinType Not Working as expected
    DataItemTableFilter is just a method to add filtering to Query. This does not conflict with SqlJoinType.
    Here is an example provided by Microsoft:
     
    Thanks.
    ZHU
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    Khushbu Rajvi. 9,235 Super User 2025 Season 1 on at
  • Alexander Drogin Profile Picture
    Alexander Drogin 256 on at
    SQLJoinType Not Working as expected
    You need to give more information for anyone to be able to help. What is the expected result and what happens when you add the filter?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,575 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans