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...
Answered

Filter query columns based on field values?

(0) ShareShare
ReportReport
Posted on by 40

Hi,

I am developing a query that selects certain fields to be exposed through a web API. Is it possible to filter the columns to be exposed based on if they have a value or not?
Say for instance on item cards, if a boolean is set to true then the query should send 3 extra fields for those items that meet the condition, and the rest of the items are sent with the usual fields.

How can i achieve this? I can't seem to make it work with columnfilters or DataItemTableFilter.

Thanks in advance.

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    157 on at

    Seems too advanced for a query object. A page might be a better option

  • Verified answer
    YUN ZHU Profile Picture
    100,644 Super User 2026 Season 1 on at

    Hi, I agree with Josh, this should be done using Page object.

    More details:

    Using the query as a data source for a page (Query.Open Method)

    https://yzhums.com/4869/

    Dynamic Visibility of Controls

    https://yzhums.com/14752/

    Hope this will help.

    Thanks.

    ZHU

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,872 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,110 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 892

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans