web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 68
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; }
 
I have the same question (0)
  • Verified answer
    Gerardo Rentería García Profile Picture
    22,524 Most Valuable Professional on at
    SQLJoinType Not Working as expected
  • One_&_Only_Naveen Profile Picture
    68 on at
    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
    89,830 Super User 2025 Season 2 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
    18,797 Super User 2025 Season 2 on at
  • Alexander Drogin Profile Picture
    262 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

Responsible AI policies

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

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans