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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Add fields in form dynamically

(0) ShareShare
ReportReport
Posted on by

Hi,

I want to add a few columns in the grid of my form at runtime. I am creating an inquiry form, in which on the basis of the user's selected values, I need to filter results. I need to show all sizes of the dimension group attached to the item. There can be more or fewer sizes present in the item, and then I need to create that number of columns in my form and then add their values in total. Below is the picture for illustration.

CaptureIssue.PNG

I have the same question (0)
  • Community Member Profile Picture
    on at

    I want to add a few columns in the grid of my form at runtime. I am creating an inquiry form, in which on the basis of the user's selected values, I need to filter results. I need to show all sizes of the dimension group attached to the item. There can be more or fewer sizes present in the item, and then I need to create that number of columns in my form and then add their values in total.

  • Suggested answer
    WillWU Profile Picture
    22,363 on at

    Hi partner,

    Please check computed columns:

    docs.microsoft.com/.../data-entity-computed-columns-virtual-fields

  • Alex VN Profile Picture
    1,994 on at

    Hi,

    In this case I think you can consider to add all the field to the grid but then have the logic in form's code to hide or show the fields based on your number of sizes for the items.

    To hide a column in X++, you can try something like this:

    MyTable_ds.object(fieldNum(MyTable, MyField)).visible(false);

    Regards,

  • Suggested answer
    Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at

    The best approach likely is creating a matrix report instead of using a form. If you want interactive filtering, Power BI will be better than SSRS.

    If you want to use a form and you need a dynamic number of columns, I can think of two solutions:

    • Using the table control (not a grid).
    • If you know the maximum possible number of columns, you can create a grid with all of them and using code to hide those that you don't need.
  • Pawan Upadhyay Profile Picture
    60 on at

    Hi,

    Below are two options :

    1) Check if you can create report to achieve this.

    2) If report is not an option then go with Table control. we have achieved something like this in one of the implementation using table control.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 608

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 591 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans