Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Dynamic display in FormGridControl

(0) ShareShare
ReportReport
Posted on by 5

Hi, I have been trapped for several weeks by this using scenario in AX.

I need to dynamically display a value at the end of the grid, for all the forms in AX.

So it is not possible to define a display method in the form level or table level.

Also, the value is calculated by a HTTP request with each line data. When there is a click in each row, I can get the value, but I cannot send back, fill in the right place.

I tried to add a FormStringControl in the FormGridControl, but have difficulty to display for each row.

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Dynamic display in FormGridControl

    And what will it predict?

    For example if the user selects a record in Customer groups, what is the prediction showing and where is this prediction used?

    Or Released products? Packing slip journal?

    I'm just curious :)

    I can easily imagine building some prediction based on specific tables, such as customer transactions. But to have a prediction that produces something useful (even in most cases, or useful nr of cases) no matter which table record is passed to it - seems very ambitious to me!

  • lalala Profile Picture
    lalala 5 on at
    RE: Dynamic display in FormGridControl

    Thanks Nikolaos,

    This is for real-time prediction, of course I can display out of the grid, using FormStaticTextControl instead.

    But for better display, it is better to show in the grid.

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Dynamic display in FormGridControl

    Would be really interesting to hear the business requirement here - if you feel that you can share it I would really appreciate it.

    My suggestion is to try to add it to a button or the right click context menu, instead of triggering it every time when some record is selected. This way it's also less likely that the whole system becomes unusable if this functionality has a bug or the HTTP call takes some time.

  • lalala Profile Picture
    lalala 5 on at
    RE: Dynamic display in FormGridControl

    Hi Sergei,

    To make it clear, the calculation is about machine learning prediction, that can be performed on any form, any data field.

    Thats why this is common, and cannot modify on particular tables or forms.

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Dynamic display in FormGridControl

    If your calculation is only triggered for the selected record, it should not be on a grid.

    Could you share us more details about this calculation - what is the business case here?

    Anyway, perhaps you can manage to display it in form caption or somewhere else, instead of on the grid.

  • Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,091 on at
    RE: Dynamic display in FormGridControl

    Hi Lalala,

    I just wonder what kind of calculation can be applied to all forms.

    Usually, you can use display fields if you need to show caluclated values for each line

    docs.microsoft.com/.../using-the-display-method-modifier

    or table field with SaveContent = No and field update in postLoad method.

    But all these approaches are required changes on particular tables.

  • lalala Profile Picture
    lalala 5 on at
    RE: Dynamic display in FormGridControl

    Thanks Sergei!

    I just want to do some common calculations that can be applied to all forms. The HTTP request is only sent when there is a click, and is light and fast for now.

    Now I can add a field to the formRun, and get the value in the eventHandler. The problem is how to display the result in the right place.

    When I use FormStringControl, the text() function changes the whole column, and if I use the formTableControl using .cell(row, column).data(result),  the row number changes with view changes.

  • Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,091 on at
    RE: Dynamic display in FormGridControl

    Hi lalala,

    Could you, please, describe in detail what is the purpose of the change? Why do you need it in all forms? For me, http request for each row sounds like quite heavy and unnecessary operation.

    But, it looks like you need to modify SysSetupFormRun class and add fields dynamically (or maybe implement the button to call http request)

    Here is an example with menu items www.dynamicsaxtraining.com/.../add-form-controls-without-form-modification

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,309 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans