Reuse a List of values for input, filtering, etc

I would like to have a list of CourseTypes ( Biology, Science, Math, etc.)

I would like to display that in a ListBox.

I tried this:

Course, with text fields:

The I tried setting a Listbox to the bit below.
But I get nothing in my Drop Down box.

This actually works correctly. I was just having a problem w/ my database. CourseType field wasn’t updating (so all Course’s had CourseType =(empty).

Welcome to Bubble @mranalogy!

For your dropdown, it’s currently populating values by searching across all the courses, then extracting the text field of Course Type. (As you create more database entries, this would display more entries in your dropdown, which likely ins’t the intent).

It looks like you might want to start building this with a bit of relational database logic.

To get started, within your application, you would have another table specifically for “Course Types”. So, instead of this being a text value, it would be something a bit more dynamic. (The Course Type table would also have the field for name).

Once you have that set up, you’d go back to your Course table, and add the field type of “Course Type”

As time permits, I’d suggest watching this lesson on how to build a grocery list app. Conceptually, it’ll introduce you to the difference between working with lists of text and then how to start thinking in terms of a relational database.

Dan (creator of LearnTo - plenty more Bubble tutorials there)

1 Like

Thanks Dan. I’ll take a look at that.

Do you by any chance have the completed sample grocery list app some place I can review it?
I find I learn best by looking at existing samples.


I built the example inside of my sandbox application, so it’s a bit muddled with other examples. (Heck, that may be a good thing!) I’ll send you a PM with a link to it.