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 2,963

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

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,029 Moderator on at
    RE: Cascading (dependent) drop down list

    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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans