Filtering connection drop-downs based on parent items
Our use case: We want to track all of our customers' cars, including the car make (Ford, Audi, BMW, etc.) and the car model (M5, TT, F150, etc.). Instead of using text fields, we'll use drop-down fields so our users can select the make and model from the drop-down list.
The Problem: If our user adds a BMW there's no need for them to see the car models belonging to the Audi or Ferrari.
The Solution: Using Dependent Drop-Downs
To do this, let's first go over our data structure. Since different car models connect to one car make, the parent item is the Car Makes data table and the child item would be the Car Models.
Here's how our data is structured in the builder.
Car Makes Data Table:
Car Models Data Table:
We have 2 fields- one is Car Model and the second is a connection to the Car Make. This will allow us to select one Car Make for each Model we add.
My Cars Data Table:
This is where we'll be adding our cars. We'll need to select a car make, then a car model. So we have 2 connections- one to Car Make and the second to Car Model,plus any other fields you require.
Now that we know how the data is structured, let's take a look at setting the dependent drop-downs.
Let's open or add a new My Cars form.
Find the field (Car Model) that we want to ensure only shows values based on a parent item (Car Make), and click the pencil icon to edit.
Under the General tab in the last option for Show choose:
Car Models connected to this form's Car Makes
When users now select the Model, only records which are related to the Make will appear in the list.