How to create a dropdown menu with values that depend on earlier choices
This app shows how to make dependent dropdown menus. In the form, you select a continent, a country, and then a document associated with that country. When you select a continent, the choice of countries is limited to that continent. Likewise, when you select a country, the choice of documents is limited to just that country.
Also see: tablet mode & fullscreen mode
How we built this app
This app has two tables. The first is a table of documents. Each document has a continent, a country, and a document name. The second table stores comments on the documents from the first table. We included Continent and Country columns in the Comments table, so when the user opens the form they can drill down to a particular document. To get the dependent behavior that we want, we added valid_if constraints on the columns of the Comments table. The valid_if for the Continent column is Documents[Continent]. Similarly, for country and document name we use Documents[Country] and Documents[Name].
This is a preview of the data sets used in the app.
This is a high-level model of both the data entities and the UI elements in the app.