Argh - so can you use drop downs to drill down by 2 subcategories?

Hi there,
New to Bubble - it is awesome, but I am not awesome at it. Here’s my issue: I’d like to allow the user to drill down to a specific wine using 3 drop downs; Winery Name, Varietal, and Year. I’d like it to work so that once you select a Winery Name, the second drop down will only show certain Varietals offered by that winery, and then once you select a Varietal the next drop down will only show certain Years which that chosen varietal was produced.

From reading through the forums I was able to get the first step to work - once I select a Winery Name, the Varietal drop down will only show the Varietals available from that winery. Woo hoo! But no matter what I try, in my Year drop down it shows all the years that exist for the Winery Name, when I only want it to show the years that exist for that specific Varietal. So winery XYZ might sell a 2014 Merlot, a 2015 Merlot, and a 2016 Chardonay but if you select Chardonnay as a varietal, the Year drop down will show 2014, 2015, and 2016.

Thanks so much for any help! Here are some screenshots:



Todd

I am interested in this as well- as the “drill down” feature is a very valuable capability in a lot of apps with structured hierarchical data. Interested in seeing what those who have come before us can come up with!

I would start by structuring your data a little differently, it will make it easier in the long (and short) run.

And link the tables together by using the data type of those tables, rather than matching on text.

Create tables for Varieties and Years. Then rating looks like this …

image

Your three dropdowns then go …

image

2 Likes

I really appreciate your help! Could I have made a mistake? After trying that I have a new issue - now I’m no longer seeing any options under the Variety dropdown or the Year drop down at all. Here’s what I did - I created 3 Data Types called Producer, Variety, and Year. I also changed the name of Wine Ratings to Wine Profile, since it seems a more apt name. Within my newly named “Wine Profile” Data Type it would not allow me to change the original field types for my fields called “Winery, Variety, and Year” from text to something else, so I had to delete those fields and create new ones and set the field type as “Producer, Variety, and Year” (to match those new Data Types I created).Here are the screenshots - let me know if I missed something (BTW thanks again - this is a huge help!):




But after following all those steps when I previewed the application, no choices appeared in the Variety or Year dropdowns. Here’s that screenshot:

So maybe my problem comes from having to delete those fields in my “Wine Profile” data type? Now there are no values in those fields, but I also noticed after making these changes I was no longer to add entries of data to Wine Profiles. I can’t edit the values of existing entries or make new entries. If I try to click New Entry and enter a new value for Producer, Varietal, or Year it lets me type but then the value disappears when I click into the next field. Also now I’m seeing “Change search field” below the fields which wasn’t there before. Here’s a screenshot:

No matter what I type in these fields, if I hit create it creates a new entry with no values in it.If I click “Change Search Field” this is what I see - should I adjust something here?

Ha, one more thing, I now see these errors:

Dang, I thought I was making progress with this but I guess I must have messed something up… Thanks in advance for any help, or if you have suggestions for resources to exploe. I read through a bunch of posts on the forum, and see several people with similar issues but not a solution for that need to make the dropdowns present certain values depending on the entries in preceding dropdowns.

Thanks so much!
Todd

Yes.

Thanks a lot, this approach worked! I really appreciate it. My “constraints” ended up being slightly different from what you suggested, in order to get it to only show options based on the criteria chosen by the user in the preceding search box/drop down. I have an image of the settings below in case anyone out there is trying to do this.

Here’s the first field for the winery name (which I turned into a standard search box rather than a drop down).

Here’s the next field, the drop down for the varietal. I guess the logic boils down to: look for varietals listed within the Bottle Profile table, but only show the varietal values where the winery name for that entry matches what the user entered in the search box.

And finally the last drop down for the year. Here I think the logic is, look for years listed within the Bottle Profile table, but only show the year values where the winery name matches what the user entered in the search box AND the varietal matches what the user entered in the varietal drop down.

By the way, something else that helped was just starting fresh with a new app. I think I initially set up my tables wonky, but then after modifying them so they were correct, it was still having issues. But just creating all the tables fresh seemed to resolve those issues so Bubble could link things up.

Thanks again!
Todd

2 Likes