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 :
Small and medium business | Business Central, N...
Answered

Cascading (dependent) drop down list

(0) ShareShare
ReportReport
Posted on by 3,255

Hi All

Is it possible to create a dependent drop-down list (Enum or OPTION) so, for example, you have a group and sub-group where sub-group values are filtered based on the group. For example, select a country  from country drop down field and you see states within that country selected on the state field available values

Thanks

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    Yes it is possible.

    You can look at how it is done f.ex with the post code on the customer and vendor table.

    There the lookup of post codes are dependent on the country you have selected.

    You also have the same method when it comes to city (field 7 in the customer table.

      field(91; "Post Code"; Code[20])
            {
                Caption = 'Post Code';
                TableRelation = IF ("Country/Region Code" = CONST('')) "Post Code"
                ELSE
                IF ("Country/Region Code" = FILTER(<> '')) "Post Code" WHERE("Country/Region Code" = FIELD("Country/Region Code"));
                //This property is currently not supported
                //TestTableRelation = false;
                ValidateTableRelation = false;
    
                trigger OnLookup()
                begin
                    OnBeforeLookupPostCode(Rec, PostCode);
    
                    PostCode.LookupPostCode(City, "Post Code", County, "Country/Region Code");
    
                    OnAfterLookupPostCode(Rec, PostCode);
                end;
    
                trigger OnValidate()
                begin
                    OnBeforeValidatePostCode(Rec, PostCode);
    
                    PostCode.ValidatePostCode(City, "Post Code", County, "Country/Region Code", (CurrFieldNo <> 0) and GuiAllowed);
    
                    OnAfterValidatePostCode(Rec, xRec);
                end;
            }

    Really powerful function.

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,468

#2
YUN ZHU Profile Picture

YUN ZHU 923 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans