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

Notifications

Announcements

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)
  • 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

  • Suggested answer
    THE Italian Profile Picture
    on at

    Guess you would like to use this as API. 

    Then better create a page, imho.

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

News and Announcements

Season of Giving Solutions is Here!

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,572

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 789 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 693 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans