Conditional data types / app data for categorization+filtering

Hi everyone. How do I set up conditional data types / app data for a marketplace? In the example below, I’ve listed 2 Categories (Furniture and Lighting), and indented beneath them are 2 examples of potential filter options: (1) sub-categories and (2) materials (there will also be “Style”, “Manufacturer name”, etc. but I’m leaving them out for simplicity):

Furniture
(1) Table (2) Wood, Glass, Metal
(1) Chair (2) Wood, Cane
(1) Bed (2) Wood, Metal, Water
(1) Cupboard (2) Wood, Glass

Lighting
(1) Table (2) Ceramic, Glass
(1) Standard (2) Metal, Wood
(1) Drop (2) Metal
(1) Recessed (2) Metal

When a seller uploads a new item for sale, I want them to select options from dynamic drop-downs. So, in the product upload page, once they select Lighting, they should only see the subcategories for Lighting, not for Furniture. Likewise for materials. (similar logic for buyers filtering through the products available)

Going to Data Types tab > Custom Data Types, I created “Category” data type with a “Name” text field. I then went to the App Data tab and, under Category, I created new entries “Furniture” and “Lighting”. But I’m stuck on how to enter the 4 sub-categories for each Category, and also the master-list of materials options… and, finally, how to link all the data as appropriate.

Do I create separate Custom Data Types for “Materials”, “Style”, “Manufacturer name”, etc? And then specify sub-categories to each of them in the App Data Tab? Do I then create a Custom Data Type “Product” where the other Custom Data Types (Category, Materials, etc.) come together like:

How would I then specify which materials, styles, etc. are connected to each sub-category?

I imagine there’s a way for the administrator to specify data for each of these categories / sub-categories (?), and then specify which ones are connected. And only have to do this once.

Hope this makes sense. Appreciate your help!

Hi, the way I set this up on my app (www.tiplister.com) is the following:

A datatype: Categories
Categories may even have a parent (this is a field type category within Category)
And a list of children ( a field type list of children within category)

So you can have categories: sports and music
sports can have as its list of children: football, tennis, soccer etc. Music can have classical, jazz, techno etc. (Technos parent is music etc)

Then I have a datatype called Filters.
Each Category has a list of Filters (so a field type list of filters underneath category)
E.g. Music has as its filters: Length of piece, interpreter, composer
and Football has: player, coach, championship.

And then the filters can also have a list of children ( a list of filters, field underneath filter) e.g. length of piece less than 10 more than 20, more than 60 minutes.

This allows you in different groups to show:
A repeating group with: Do a search for categories. to show all categories.
Then if you click a category, display its list of children
and also its list of filters or its first filter and that first filters list of children.

hope that makes sense.

Thanks for taking the time to respond, TipLister!

In the examples you mentioned, each Filter had options that were unique to each category. What if some of them were common? For example take your 2 categories (Sports and Music) what if you also wanted to filter by college name? Some colleges have a classical music program, but not a jazz program, some have both, some have neither. Some schools have a tennis program and/or golf program, some have neither.

Let’s say my site focuses on Community Colleges in Florida. I want to be able to enter the list of Community Colleges in Florida once, and specify (once) which schools have which sports programs and which music programs (if any). That way, if a person uploads a new page on my site and specifies that it relates to Jazz music, the “College name” filter will only show the schools that have a Jazz program, not those that don’t. Similarly, if a customer filters by college first, and then wants to filter by sports and music programs, the drop-downs should only show the options that that school has, not entire, exhaustive lists of sports and music programs.

Hope that makes sense. And REALLY appreciate your help!

Ok… figured it out.

First of all, I owe HUGE thank you’s to:

  1. @romanmg!! Without this video (In-Depth Bubble.io Tutorial: How to Build ANY Type of App Without Code on Bubble: https://www.youtube.com/watch?v=6OKVj1A9OcY) and the many other free tutorial videos she’s so generously shared on YouTube, I’m not sure I would’ve gotten started on Bubble! (I definitely would’ve been WAY more lost than I am!)

  2. Echo Lake Technologies for helping me crack a key database issue: if you’re creating a new database entry, and a field in this entry needs to link to / draw from app data that you’ve created previously, the system by default expects you to enter the Unique ID of the existing app data. I, on the other hand, kept entering the “Name” and couldn’t figure out why the field never populated! We need to first let the system know to look for Name, not Unique ID (watch from 2:55-7:00 of https://www.youtube.com/watch?v=aSAc3bjJ1WI).

With that, I’m going to try and give a detailed explanation of how I solved my issue (above). If anyone has any feedback / suggestions on how to ‘code’ this more efficiently, do let me know!

I first went to Data > Data Types > New Type and created a “Style” and then a “Category” (because, in my case, Categories need to have a list of Styles)


image

I then went to App Data tab > edit All Styles and first listed out all my Styles (masterlist).

Once that was done, in the header row of All Styles, I clicked on the magnifying glass icon next to “Created by”:

There I defined the Primary Display field Style’s as “Name” (when you first go here, all fields are defaulted to “unique id”).

After saving that, I went to App Data tab > edit All Categories. Here, when I created a new entry, I was able to select the styles relevant to that specific category by typing out and adding the Style names I wanted (as long as the style name you type out is in the Styles masterlist created above, you’re golden).

You then see the specific Styles you selected listed against each Category.

From here, I went to the Design page and created 2 drop-downs. The first one was for Category, and the second for Style.

As the images below show, setting up “Dropdown Category” was fairly straightforward, but the "Dropdown Style"s “Choices Source” and “Option Caption” are key. You’re saying look up the Styles associated with the Category Value specified in the Category dropdown, then specify the Name(s) of those styles.


And there you have it! If others have this need / issue, I hope this explanation helps!

image