Forum Academy Marketplace Showcase Pricing Features

Dropdown list based on things that excludes those things in another list

Hi Everyone,

I’m new to Bubble and I’m struggling with a dropdown list. I’m trying to make an app to manage a table top game.

I have some Special Rules in a Data Type and these Special Rules can be added to a Race.
In the Race Data Type I have Special rules as a List of Special Rules

I’d like to have a dropdown that lists all Special Rules not yet added to that Race’s List of Special Rules but I cant figure out how to exclude already added Special Rules.

I hope that explains it enough. Please help.

Hi there, @JamesP… the short answer is you can use the :minus list operator to remove the specific race’s list of special rules from the dropdown.

To elaborate a bit… let’s assume the dropdown’s choices source is Search for Special Rules with no constraints. After that search, you can add the :minus list operator, and then you will define the list to remove as the Race's List of Special Rules. I would need to know more about your app in order to know how you will specify exactly which Race is being referenced, but let’s say the dropdown is in a group that has a Race associated with it, then it would be Parent Group's Race's List of Special Rules. So, the entire query would look like Search for Special Rules:minus list Parent Group's Race's List of Special Rules.

Anyway, I hope that makes sense, and I hope it helps.

Best…
Mike

@mikeloc Thanks ever so much! That was exactly what I was looking for. I didn’t realise you could add anything after the search!

1 Like