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 :
Microsoft Dynamics AX (Archived)

Convert Records to Columns on a Form

(1) ShareShare
ReportReport
Posted on by 3,542

I have a table (TableA) with significant fields NameCalculationRule and TotalCalculationRule  is a set of operations that produces a Total for a specified Worker. The user can create 1..N of these records.

If the totals are populated for a specified worker, it will look something like this:

Worker: Steven

Name CalculationRule Total
CalcRule1 (reference to some calculation) 35
CalcRule2 (reference to some calculation) 21

If the user would like to run the calculations for multiple users the data needs to presented in some appropriate way.

My boss wants it to display in the following way on FormF:

Worker CalcRule1 ... CalcRuleN
Steven 35 ... 99
John 77 13
Jason 11 78

I already accomplished this by a bit of a messy way:

  1. Created a tempTable (TempT) with 25 fields. One is a HcmWorker reference and the rest are Real fields.
  2. Limit the records in TableA that can be used on FormF to 24.
  3. Class code to populate TempT from TableA.
  4. On FormF populate the grid column labels from TableA.Name

This is in working order. I was just wondering if there is (in development terms) a "neater" method? Yes a report would solve the neatness problem, but the user needs to act on the data, which cancels that out as a possible solution.

Thanks for reading

*This post is locked for comments

I have the same question (0)
  • Pete Alberts Profile Picture
    3,542 on at

    Thanks Crispin.

    I don't know what you mean with "rings a bell?".

    It's not much of an improvement. Fields or array elements in a field - basically the same thing.

    I still need to run massive class code to populate the second table and hardcode the grid labels.

    As a side question - Can an array field be dynamic? I have seen arrays in tables, but to date I haven't used it myself.

  • Pete Alberts Profile Picture
    3,542 on at

    On dynamic arrays: stackoverflow.com/.../static-array-vs-dynamic-array-in-c

    I'm quite sure it won't work on a table field.

    I am capable of writing a loop and declaring an EDT. Thanks in any case :)

    I was saying that storing data in a fixed number of field array elements opposed to storing data in a fixed number of fields, for a variable amount of columns, is not an improvement. And I can't set the label in the EDT Array Elements properties as the labels are determined by the user input - as I mentioned in the OP.

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans