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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

QueryObject LeftOutJoin With DataItemTableFilter Not Working

(0) ShareShare
ReportReport
Posted on by 1,165

Hi ALl,

Tried create a query to get Item attributes shown as columns.  Some items do not have attributes assigned so the query shoud still return these items.  However DataItemTableFilter acts as SQL where clause.  Is there any other way to get this in a Query work as a left join or do I have to create a page?

query 50121 TestItemAttribute

{

    elements

    {

        dataitem(Item; Item)

        {

            column(No_; "No.")

            {

            }

            column(Description; Description)

            {

            }

            dataitem(ItemAttributeValueMapping9; "Item Attribute Value Mapping")

            {

                DataItemLink = "No." = Item."No.";

                SqlJoinType = LeftOuterJoin;

                DataItemTableFilter = "Table ID" = const(27), "Item Attribute ID" = const(9);

                column(ItemAttributeValueID; "Item Attribute Value ID")

                {

                }

                dataitem(AttributeValue; "Item Attribute Value")

                {

                    DataItemLink = ID = ItemAttributeValuemapping9."Item Attribute Value ID";

                    SqlJoinType = LeftOuterJoin;

                    column(ValueValue)

                    {

                        Caption = '9';

                    }

                }

            }

        }

    }

}

I have the same question (0)
  • Suggested answer
    THE Italian Profile Picture
    Microsoft Employee on at

    Guess you would like to use this as API. 

    Then better create a page, imho.

  • Anita75 Profile Picture
    1,165 on at

    Page can be done but this is a limitation with QueryObject so I think queries work only in simple scenarios ...hopefully enhancemnets in the future

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,821 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,122 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans