I have a CLASS table. For each, class, I have top level categories such as
Math, Science, Biology etc. Then under each, I have further sub-categories such as for math, Calculus, trig, etc. under Math category.
How do I create this structure, such that when I am creating a class, I use a drop down to assign a sub-category to it.
I also need to provide for a way to search my database by these drop-down subcategories.
Thanks.
Hi there, @mntcastleā¦ are you going for something like thisā¦
ā¦ with the added classes displayed in a repeating group like thisā¦
ā¦ and the ability to filter the repeating group (or as you said, search the db) like thisā¦
If thatās what you are trying to accomplish, I did that with a Classes
table that includes category
and sub category
fields, and the categories and sub categories are powered by an option set.
If you are not familiar with option sets, check out this postā¦
Anyway, I hope I understood your post correctly and that my response can help you to get down a good pathā¦ best of luck!
Bestā¦
Mike
Thank you ever so much. Yes, this is what I need. I will check out the option sets.
Charan
Are there any videos that explain how to set this up. I could not follow manual description.
First question, Is the Option set the name of the set of categories? And then options are the option in the categories?
How would one setup a sub-category. Would I then need to create a optionset for each the categories in the top level?
If the example I showed is exactly what you are looking for, I created it with one option set named Classes
, and each class (Trigonometry, Algebra, Calculus, Literature, etc.) is an option in the set. The option set has one attribute called category
, and on each option, I modified the attribute to be the name of the high-level category (Mathematics, English, etc). That setup looks like thisā¦
Options:
Attribute for Calculus:
Do you think that can help you get going?
Bestā¦
Mike
I was able to follow your logic for the creation of the data set, but could not figure out what to put on the page. I added a drop down input, where I want to select the main category(such as Math) and then get the options for that category. Not quite sure how that logic works. - Thanks.
Ah, okayā¦ here is how I set up the drop downs. Here is the main categoryā¦
ā¦ and here are the filtered classesā¦
Does that help?
Bestā¦
Mike
Hi Mike,
I literally just started learning Bubble just a few days ago, and one of the issues I had been trying to figure out, is exactly what you described above.
THANK YOU SO MUCH!
Iām trying to create a ālistā of States, and a list of local counties in each state. Iād never have thought to use the States as the āhigh-levelā category, and the Counties as the options - my thinking had led me to use the States as the options, and I couldnāt figure out how to make the counties a āsub-categoryā of that. So a big thank you, once again.
I do have two questions though, using your examples aboveā¦
-
What if I wanted the user to be able to just select/add Mathematics (and by default, all subjects under that class), without having to add any sub-categories? Sort of an āadd ALL Mathematicsā situation?
-
Could I also have a user run a search for just the Mathematics category? Letās assume each Mathematics class (calculus, trigonometry, etc) was linked to some students signed up to that class, and I wanted to pull up a search of ALL students signed up to ALL Mathematics classes?
Thanks again, Mike. Youāve been a great help already!!
Hi there, @obvolutā¦ welcome to Bubble! Itās great to hear my responses in this thread have helped you outā¦ thatās the beauty of the Bubble forum for sure!
With regard to your first question, it should be possible (Iād have to test it out to be certain, and I wonāt be able to do that anytime soon) with a backend workflow to create the classes and the Custom Events >> Schedule API Workflow on a list
workflow action (youād need to be on a paid plan, though). The List to run on
would be something like All Classes:filtered
, and the filter would be something like This Classes category is some field on the screen's value
.
Your second question would be possible, too, and I would probably do it by saving the category along with however/wherever you are saving the student/class associations.
Hope this info is useful as you keep making progress, and again, welcome to Bubble!
Bestā¦
Mike
Thanks again Mike. Will tinker around with it, and see what I can make happen.
This topic was automatically closed after 70 days. New replies are no longer allowed.