Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

How Do I: Drop-down list dependence

GlennCauley
Level 2
Level 2

I need to put 2 drop-down lists in a form.

The first will be named "Occupation" and the second will be named "Title."

When I make a selection in the first "Occupation" drop-down list, the second "Title" drop-down list will appear.

Here's the kicker...

The second "Title" drop-down list must contain a unique set of items that pertain to the item selected in the first "Occupation" drop-down list.

Example:

In first drop-down list "Occupation" select item called "Analyst"

The second drop-down list "Title contains 2 items:  Data Analyst, Financial Analyst

In first drop-down list "Occupation" select item called "Clerk"

The second drop-down list "Title contains 3 items:  Admitting Clerk, Data Entry Clerk, Staffing Clerk

I do not know much about scripting, so specific instructions (or better, an example PDF file) would be highly appreciated.

7 Replies
pguerett
Level 10
Level 10

Where is the list of occupations and Titles that will populate the DDList coming from? Are you hard coding them or are they coming from somewhere else?

Paul

GlennCauley
Level 2
Level 2

Thanks for your reply, Paul.

At this time, the items would be hardcoded into each DDlist.

(We are not pulling any information for a field from a database or anything like that.)

pguerett
Level 10
Level 10

OK then it will have to be done through script ....if you want to mock up a quick example I will show you what the code will look like.

Paul

GlennCauley
Level 2
Level 2

I have attached a mock-up of the file with the 2 DDlists shown.

I populated the first DDlist (Occupation) with some items... but didn't populate the second DDlist (Title) with anything b/c the contents will change depending on the selection in the first DDlist.

pguerett
Level 10
Level 10

Here you go ....the code is on the exit event of the Occupation DDList.

Paul

GlennCauley
Level 2
Level 2

Paul, you are my saviour!!!

Thank you VERY MUCH.

Glenn