Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

How to make a newly added field a dropdown menu field?

Posted on by Microsoft Employee

I added a new field by extending an exisiting table. I also updated the form so that it shows up on my screen. As of now the field is of type string. I want to add a dropdown menu of options for this string field, instead of having it be a field where a user types in an input. How do I change the field so that is a "drop down and select" field instead of a "type in value" field.

Essentially there are fields like mode of delivery, which you click the arrow and select from a menu of options. This is the functionality I want for the new field I created. How do I make my field more like this, and how do I add options for the dropdown menu?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to make a newly added field a dropdown menu field?

    So I followed the steps provided by Nikolaos.

    1. I created a new table containing the new field (string).

    2. I went to my extended table, and under relation I set my extended table's field to equal the field in the new table I created (As well as the table relation, not just the field).

    3. I created a form for the new table I created. I made the form's design "Pattern: Simple List

    4. Created a few entries in the form, by making it the startup object and running the debugger. When I go to my table browser of the new table I created, I can see the fields that I added.

    I'm having trouble creating a menu item, that uses this populated table I have, as a pick list. I created my menu Item by doing the following steps:

    1. In my solution explorer I clicked "add" and selected New Item. Then clicked "Display Menu Item"

    2. Under the properties, I set "Object" to the form that I created for my new table. (The form associated with the new table I created. This table holds the possible strings I want the dropdown menu to display, for users to choose from).

    After syncing the DB, I still dont see that field I added as a dropdown menu

    What did I do wrong? Or what do I still need to do?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to make a newly added field a dropdown menu field?

    Dear D Feely,

    I'm going to try and make it an enum first, since it seems like the simpler of the two options. When I create the field I can select enum as the field type in my table extension of MarkupAutoLine.Extension. What do I select in the corresponding form MarkupAutoSetup.Extension. Enum is not an option. Would I select String since the inputs are technically strings? Also how do I add to the list of fields users can choose from?

  • Suggested answer
    feelyd Profile Picture
    feelyd 260 on at
    RE: How to make a newly added field a dropdown menu field?

    You could also add the field as an enumerated type. When you are editing the field a list of the options will be displayed.

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: How to make a newly added field a dropdown menu field?

    You need to create a new table where those selectable values are held. Then add a relation from your existing table extension (and field) to this new table.

    You also need to add a new form that acts as the user interface for that table. And a menu item that will be used to open that table. The selection values will be created by using this form.

    You can find an example from the standard system: DlvMode table (and form), and relation "DlvMode" in SalesTable table.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans