Archive for March, 2009

Conditional Dropdowns

Tuesday, March 31st, 2009
About ten days ago, QuickBase provided a new release that provides a feature that users have been requesting for many years - conditional dropdowns.
What is a conditional dropdown?
You’ve probably filled out a form where you made two selections, and your choices on the 2nd depended on what you chose for the first. For example, you might reserve a car from a rental company. First you choose a Manufacturer (Chevrolet, Toyota, Ford, etc) and then you choose a model. If you choose Chevrolet, your models will include the Aveo, the Corvette and the Malibu; but if you choose Toyota, your models will include the Prius, the Matrix and the Camry. That’s a conditional dropdown.

That’s cool. When can I use this?

Sometimes. You must have a relationship between two tables in order to create a conditional dropdown.  The conditional dropdown will be on the field that links the two tables - the “Reference” field, which is often called “Related” something.

In the example above, you might have a table of Manufacturers, a table of Models, and a table of Autos. In the Auto table, there would be fields called “Related Manufacturer” and “Related Model”. The conditional dropdown would be the Related Model.

You cannot use a conditional dropdown in a standard text multiple choice field - it has to be a reference field.

How do I do it?

First, think it through. What will the options in the dropdown list depend on? In our example, the options for Model will depend on what Manufacturer is chosen.

Then just open the field definition page for the field you want to designate as conditional. (Click on the table name, then customize, then fields, then the field). Check the box that says “Conditional Behavior” and then fill in the blanks just as below:
Dependent Dropdown
You can try out this example by clicking here: https://www.quickbase.com/db/bd8y59imz?a=GenNewRecord.

What else do I need to know?

Just a couple things. If you are using proxy fields, the conditional dropdown should be on the reference, not the proxy. Conditional dropdowns should work in Grid Edit, although as I am writing this there is a problem with conditional dropdowns in grid edit for IE 7. I am sure this will be fixed soon.

I bet there are other cool things I can do with this.

There are - here is one of them. You know those “Record Picker” boxes that come up when there are too many choices for a dropdown?
Record Picker
You can use conditional dropdowns to get rid of them.  (Note this example might require a little experience with Quickbase).
Say you are selecting a Major League baseball player. There are so many that QuickBase automatically requires data entry through a Record Picker form. Create one field for entry of the first letter or letters of the name, and a table that lists the whole player name. Make the selection of the name dependent on selection of the first letter(s).
So if you enter “M”, you see Mays, Mantle, and Maris. If you enter “P”, you get Pedroia, Perez and Pettitte. By entering the first letter, you can reduce the number of options so that the user can select the name without opening a record picker.