DataBase Structure for conditionnal Dropdowns

Hello all,

I have been using Bubble since a few months and can’t believe i’m struggling so much with a dropdown conditionnal.
The worse thing is that I managed to make it work 2 days ago and immediately changed something that created my actual issue:

Users create an article that they want to sell in a Popup.

So Dropdown 1 is a Racquet Brand (Option Set ) (Babolat, Wilson, Head…)
And in Dropdown 2, I would like to display just one list of model based on dropdown one.

I have an option set Babolat Models (Aero, Pure Drive, Strike…)
I have an option set WIlson Models (blade, clash…)
and so on…

Here is dropdown 1

Here is dropdown 2

Here is the issue (dropdwon 2 doesn’t show anything)

Here is my database structure:
This is Racquet DATATYPE
relationship

And Model DATATYPE
OS models

Do you know what could be the problem ?
If not, do you see any possible optimization in my database?

To be honest I don’t think I have to create a DATATYPE for each brand with field model (OS State) and Related Brand (custom tennis racquet because it has worked without that structure)

Thank you very much for your time!!

I’m not really following your database structure here…

But this is a question that comes up very often in the forum - and the basic concept is simple.

The choices source of the second dropdown just needs to be constrained by the value of the first in some way.

Usually, you would simply either have a list field on the parent datatype of the available child options OR just have a single field for the parent datatype on the child items, and constrain that way.

So, just add a list of Models to your Brand Datatype (or add a Brand field to your Model datatype) - and use that to constrain the choices for the second dropdown by the value of the first.

I get the idea of constraining, (which is something I have already done==> see screenshot) that was not my question, yesterday in another post I asked you how you would organize my DB and you didn’t answer, then in this next post I put every element I have and know, and I know there is a lot of information in the forum , if i post again it is because i’m struggling with that.

Your answer 5 minutes after my post indicates that you didn’t check my DB structure and screenshots and said “add a Brand field to your Model datatype” which is something I have already done.

Thank you for not answering if you are just stating things that are present above.

People volunteer their time to help so don’t criticise if they don’t respond to every particular of your question. Adam is one of the most active (and respected) members in the forum so I’d avoid smartassing as now you’re not going to get help from anyone.

2 Likes

First, what George said.

Second, you are mixing option sets and data types in a way that doesn’t make sense.

Third, you really only need two options sets… one for brands and one for models.

Fourth, you can either add a racquet brand attribute to the OS Racquet Models option set or you can add a racquet models attribute (list) to the OS Racquet Brands option set. If you go with the former, associate an option from the brands option set with each option in the models option set. If you go with the latter, associate a list of models with each option in the brands option set.

Fifth, get rid of the Model data type.

Sixth, get rid of the Model field in the Racquet data type, and create a new Model field that links to the OS Racquet Models option set.

Seventh, leave your brands dropdown the way it is.

Eighth, in the models dropdown, get all of the options from the models option set, add the :filtered operator, and constrain the filter based on the value of the brands dropdown.

1 Like

But you said it’s not working… so you’ve obviously done it wrong?.. otherwise what’s the problem?

yesterday in another post I asked you how you would organize my DB and you didn’t answer,

I don’t understand your database structure now any more then I did in your other post, and I have neither the time, nor the inclination nor time to try and work it out, when it doesn’t make a lot of sense.

I gave you a simple overview of the general approcah, that I though you’d be able to work from to fix things yourself. Evidently not.

Lucky for you, @mikeloc has taken the time to decipher your current setup and correct it for you, so follow his guidance and you’ll be sorted.

1 Like

I know George, I am not criticising Adam, as I really appreciate the time he did take to help me. Previous to this post we had an exchange on the same topic (with him) he really tried his best to help even though we couln’t understand eachother at the end. I was saying than in the second post, I didn’t get why he was answering so fast, stating things that we had discussed the previous day and not really answering to my DB question. and to be honest I was a bit frustrated …

Thank you VERY MUCH Mike, for the time and answer. I really appreciate this and will give it a try. Best

1 Like

Hello Adam, thank you again for the time you have spent on my issue. Didn’t mean it really I think my patience took the better of me ( If it makes sense in english).

I apologize for that.
Best,

1 Like