web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to add multiple values of one field to a table

(0) ShareShare
ReportReport
Posted on by

Hi all

I create a new Enum "ModuleType" and I want to add the field to the InventTable.

Problem. One Item can have multiple values of "ModuleType"

How can I add this information and especially how can I implement this in the form to show and select the values?

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    I am not sure what you are trying to do as business process but if you want to keep multiple values in one field of single row, you may think to use Array Elements of EDT, I am not sure if this is supported yet in AX7.

    msdn.microsoft.com/.../aa675074.aspx

    other ways can include change in your architecture such as creating a new table to keep multiple values against one master record (your inventory transaction)

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You would create a new table, and add a relation to InventTable. Then on the relation > right click > add primary key based field relation. That will make a reference to your InventTable record.

    Then you have to create and connect a new form and menu item pointing to your new table, and add the menu item as a button on wherever you want the linking to be done. Pass in InventTable on the menuitem as datasource. AX should take care of the record context if you do it right, if not then you might have to use addDynaLink() on your new datasource to refer element.args().record() as InventTable passed in.

    This way you may have multiple moduletype registered in your new table against the same inventtable record.

    Another solution would be to store it in a container as packed value directly in inventtable, but that is bad approach in light of performance, plus you would not be able to do select statements for that field (joins).

    Edit: the above is for AX 2012, I was unsure if you do you AX 7 based on your tags. The concept would be similar for AX 7, which means you should not do it on the table directly. I think you need to refresh your studies on relational databases with 1:N joins.

  • Community Member Profile Picture
    on at

    Well I think creating a new table with reference to the itemid would be better. Question than is how to show the values on the EcoResProductDetailsExtended Form and how to add/remove values from there

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans