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...
Suggested answer

Hiding Columns based on row values

(1) ShareShare
ReportReport
Posted on by 980

Hi All,

I have a requirement where in the Job Task Table based on the Task Type a column would be hidden or shown row wise.

Is this possible to achieve?

pastedimage1670430817569v1.png

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,389 on at
    RE: Hiding Columns based on row values

    Hi

    not on you can obscure a column common to several rows

    meaning, since it is common to rows, how can you make it appear for one row and not for the other?!?

    you could instead use customisation to make the value obscured for a particular row

    that's what I would do:

    create a variable of the same data type as the field you want to make hide or show.

    in the onaftergetrecord of the page you assign to that variable a blank value if your flag is up, otherwise you assign it the value of the field you want to show.

    this variable you expose as a column within the page instead of your field

    check my answer if it helped you, thanks

    DAniele

  • Indira88 Profile Picture
    980 on at
    RE: Hiding Columns based on row values

    hi DAniele,

    thanks for this but since this is a boolean checkbox can we hide the checkbox?

    I couldn't do that .Is there a way to do that.

    Indira

  • Suggested answer
    pankaj.k Profile Picture
    994 on at
    RE: Hiding Columns based on row values

    Hi Indira88,

    On the bases of your requirement you need to create one page Because you already have Boolean Data Type Field so you can use it as a filter based on your data requirement.

    Please find the attached screenshot that will may be beneficial for you.

    show.PNG

    Without Filter Data...

    show1.PNG

    With Filter Data... 

    SourceTableView = where(ShowHide = const(true));

    show2.PNG

    Thanks

  • Suggested answer
    YUN ZHU Profile Picture
    93,514 Super User 2025 Season 2 on at
    RE: Hiding Columns based on row values

    Hi, I think it can be done.

    First, add a default filter to the OnOpenPage trigger when opening the page.

    Add filtering logic to OnValidate Trigger in the Task Type field, and refresh the page.

    Here are some related links that hopefully give you some hints.

    https://yzhums.com/14752/

    https://yzhums.com/16756/

    Thanks.

    ZHU

  • Indira88 Profile Picture
    980 on at
    RE: Hiding Columns based on row values

    Hi Zhu,

    Thanks for this I understand how that could be done on a header part but how a column control boolean could be hidden is my question.

    For a certain value say '1'  in a table the column type boolean(checkbox) has to be hidden and for the column value '2' the checkbox should be visible.The checkbox is a part of the same column,Referring to the diagram pasted above.

    Thank you once again for all your help

  • Indira88 Profile Picture
    980 on at
    RE: Hiding Columns based on row values

    Pankaj Thank you for the explanation,but the values which are controlling the column hide/show cannot go away as described in the above example,and I will have to do this as a part of an existing page customisation.If you can understand from the screenshot described in my strating email.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,056

#2
YUN ZHU Profile Picture

YUN ZHU 1,680 Super User 2025 Season 2

#3
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 1,679

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans