Populate one choice list based on another choice selection

I have 3 sheets. Vehicle, VehicleMake and VehicleModel. VehicleMake has two columns Name and MakeModels which is a has many relation to VehicleModel. In VehicleMake I have 3 columns, Name, Model and ModelMake which is has a relation to VehicleModel sheet. After populating data in Name and Make columns in VehicleModel sheet, I see the relation columns properly populated. Now Vehicle has Make, Model and some other columns like year, color. On the screen to create a Vehicle, I have choice component for Make, Model, Color and Year. After the user selects a Make, I want to show only the models for that selected make in Make choice component but it is nor working. For Model Choice component I have mapped the source to VehicleModel sheet and Name column and in filters I am saying Make is Screen->Make but that is not working. Am I applying the filter in a wrong way or is it not doable?

1 Like

See if this helps:

1 Like

This did not help. Seems like there are so many columns in FruitList that things are not very clear. Looks like key columns and ColorChoice and FruitChoice. ColorChoice column is populated on select in color choice. So I added a MakeChoice column but it does not get listed on Column under Data so that I can populate it.

I think the issue in my case is that I am on ADD page created by Glide rather than your example is a details page.

@Navjeet_Chabbewal

Take a look at https://dynchoices.glideapp.io to help you

Saludos

Ah…yes. As was referenced later in that thread, this logic doesn’t yet work in Add, Edit or Form screens

Then I how do create a details screen from my starting point which is the list of Vehicles.

@gvalero I think the issue is that I am on ADD screen not a details screen. See my response above.

Ah ok! I didn´t see that important detail

As Robert wrote, the relations don’t work in Add, Edit or Form screens. Your plan B could be to make relations outside of these screens (like my DynChoices demo APP makes) and later use a button working as Form to write the selected values to your GS columns automatically if it is what you want to get.

Saludos @Navjeet_Chabbewal

May be it’s because I am a newbie at Glide, I am not sure how to proceed to create a new vehicle where I can filter car models based on car make selected by the user. @gvalero, @Robert_Petitto, can any of you mind taking a look at my app or I can share the Google sheet and you can show me a basic example?

Sure @Navjeet_Chabbewal

Send me a PM with your sheet to take a look at.

I think you are close to get what you wish.

Feliz día

Just sent u the link, let me know if u can copy/open it.

I figured it out and the solution was simple. @Robert_Petitto when I looked at your app’s voting tab, that gave me an idea. All I had to do was to include both Model and Make in VehicleModel sheet and filter model names to list values where make is same as make value selected in Make choice component.

Yes! That’s it. I assumed you had both in the same sheet already. My apologies.