Skip to main content

Notifications

Community site session details

Community site session details

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

How to add the condition in DataItemTableFilter in Query?

(0) ShareShare
ReportReport
Posted on by 2,211 Moderator

Hi,

I have created a query in which I have used the LeftOuterJoin.

But I want to add the DataItemTableFilter based on the boolean field value of the table.

pastedimage1671545091361v3.png

I want this filter to work only if the uerIsEuropeanfield is true else the filter should not work and fetch all the records from both tables..

I don't know how to make this DataItemTableFilter not work based on the condition.

Can you please help me? or can you please suggest me another solution like how to add if else in DataItemTableFilter. or any other solution?

Kindly help.

Regards.

  • Govinda Kumar Profile Picture
    2,211 Moderator on at
    RE: How to add the condition in DataItemTableFilter in Query?

    Hi ZHU,

    This is to insert data in a temporary table and use that temp table in the process but before this, I want to filter.

    I got your point, thanks for suggesting it.

    Regards.

  • Verified answer
    YUN ZHU Profile Picture
    81,360 Super User 2025 Season 1 on at
    RE: How to add the condition in DataItemTableFilter in Query?

    Hi, just adding some info.

    My suggestion is to add a new temporary table, use this temporary table to create reports, and sort according to your needs when inserting values.

    Although the efficiency is not the best, but the simplest.

    Hope this helps.

    Thanks.

    ZHU

  • Verified answer
    DAnny3211 Profile Picture
    9,276 Moderator on at
    RE: How to add the condition in DataItemTableFilter in Query?

    hi

    look this

    learn.microsoft.com/.../devenv-query-using-instead-record-variables

    "I cannot use a query as a data item in the query" -> not possible

    check my answer if it helped you, thanks

    DAniele

  • Govinda Kumar Profile Picture
    2,211 Moderator on at
    RE: How to add the condition in DataItemTableFilter in Query?

    Hi Daniele Incalza,

    Thank you very much for replying.

    I have found another logic to do my work, not adding DataItemTableFilter, but I'm more interested in your method.. can you please elaborate more?

    I cannot use a query as a data item in the query

    Regards.

  • Suggested answer
    DAnny3211 Profile Picture
    9,276 Moderator on at
    RE: How to add the condition in DataItemTableFilter in Query?

    Hi

    can't be dynamic that filter

    either make two queries, or put it as a filter in the dataitem fields but as a filter so that from AL you can filter by whatever you want

    DANiele

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans