Create a set of variables a user has to choose from with rules?

How should I set up my database to create a set of variables a user has to choose from with rules? For example, a user would

  1. See a list (e.g. food, drinks, spaceships)
  2. Choose a category, e.g. food
  3. See a set of options from which they have to choose one or to items, e.g. vegetables - carrots x 2, fruits, apples x 4, fish - dory x 1. But there are rules here such as at least one of each item has to be selected

Any help is greatly appreciated!

Thank you :slight_smile:

Well, I would recommend creating one collection with 3 fields.

Field 1 - All options (carrots, apples, dory, lager, wine, juice, apollo13, soyuz13 etc)
Field 2 - All sub categories (vegetables, fruit, fish, alcohol, softdrinks, spaceships etc)
Field 3 - All main categories (food, drinks, spaceships)

Optional: Add a 4th field called uniqueID which will be unique to each item in field 1.

Visualise an excel spreadsheet if you can with the above fields.

Then on your screen, add 3 drop down boxes.

First drop down - Main categories (user can only select one obviously)
Second drop down - Sub categories (user can only select one obviously) [Filter --> only if selected in first drop down]
Third drop down - All options (user can only select one obviously) [Filter --> only if selected in second drop down]

Add a submit button and connect the record to the user.

That should be a good start I think. Everything else you have to have a trial and error approach.

Thanks so much for your speedy reply! This is a great start. The first and second dropdowns make total sense but I need the users to be able to choose multiple items from multiple categories after, so do you think I should have a list of dropdowns displayed after that? And is it possible for dropdowns only to be displayed depending on certain logic?

Thank you!

Just think of building it like a tesco or sainsbury’s shopping list. Have the category and sub category dropdowns on top and whenever a user makes a selection, the items list shows up. So the third dropdown doesn’t actually have to be a dropdown. It can be a simple list or a custom list.

Yes, dropdowns/lists/images everything can do displayed or filtered based on a certain logic.

1 Like