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)

DataField type in array

(0) ShareShare
ReportReport
Posted on by 59

Hi :)

I have a task to make dialog with undefined number of fields. I mean that I'm going throw InventTable and searching for missing data, when it occurs I'm adding a field to my dialog and display it at the end with all fields at the same time. 

My only idea is like that:

d = new Dialog();
field1 = d.addField(types::String, "some text");
field2 = d.addField(types::String, "some text");
field3 = d.addField(types::String, "some text");
d.run();


it's not effective because I need to make a lot of variables, but DialogFields not allows to be an array.

Is there any solution to make that somehow like array to avoid making hundreds of variables? 

*This post is locked for comments

I have the same question (0)
  • Crispin John Augustine Profile Picture
    37,081 on at

    So you know the answer yourself.

    You can create Array fields.. docs.microsoft.com/.../x-standards-arrays

    If you Need help specific to a situation, comment below

  • Patryk Mi Profile Picture
    59 on at

    I can't do it, i get an error:


    ssadasdasd.PNG

    But maybe i'm doing it wrong way. If so, please explain it. I'm kind of beginner in X++

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

    Dialogs are used for inputs from users, not for displaying data. Is your intention to allow users to fill in the missing values, or why did you choose a dialog?

    If you always show fields from InventTable, what about creating a form with InventTable as a datasource, putting all fields there and simply hide in code those you don't want to show?

    Anyway, back to your question - you can easily add dialog fields to a List object, for instance.

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
CP04-islander Profile Picture

CP04-islander 26

#2
imran ul haq Profile Picture

imran ul haq 8

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans