Different details for each element of a list

Hi all, I consulted all online resources regarding lists for days, but I failed to understand what seems like a very easy step instead. I’d love some help, please!

Here is what I have at the moment:

2 collections:

  • FOOD CATEGORY (vegetables, fruit, meat…)
  • ALL FOODS (apple, corn, chicken, banana, beef, zucchini…)

I linked the collections so that each food category has multiple foods.

I created a horizontal list of FOOD CATEGORIES. How do I make it so that when users click on one image (for example Vegetables), it only displays the vegetables? At the moment, wherever I click on the list, it gives me a screen of ALL FOODS:

Also, I want to make sure that when users click on a food on the second screen, they open a “card” showing the details of the food. Do I need to make a screen for every food? Or do I need to make another list instead?

Could anyone show me what I am I doing wrong, please? What should be the relationships and links between all these elements? Thank you in advance to whoever takes the time to explain this to me!

Hi @marina_f_s ,

It is similar, but not exactly the same

To use horizontal list, you need help from variable which is saved in logged in user collection.

Watch @Victor video first, and don’t forget to watch multiple times to really understand. :grinning:

Then if you still have trouble, ask again.

1 Like

Hi @Yongki, thanks for your reply. What if it’s another type of list instead of the horizontal one? I still can’t seem to understand how to link each food category on one list with certain foods on another screen.

I usually use custom list, as it provides more control, it has rectangle which is useful for me.

In your scenario, you need to choose category of food, so you have food category screen which is inside it is custom list of food category collection, then you add action to link to other screen.

Lets call other screen is food screen, in this food screen, you also have custom list which use all foods collection, and filter it with current food category > all foods (name of your collection).

So you have 2 screens, first screen to capture food category and pass it to second screen so you can access it with current food category in the filter.

Horizontal list work the same, it is just they need more help with temporary variable to achieve the same functionality as current food category for filtering.

Hi @Yongki, OMG thank you so much! What I was not doing was filtering by “CURRENT” food category!! I feel so stupid, I spent days trying to figure out the issue, and it was just one simple word! :sweat_smile:

1 Like

We all do mistakes like that, it only happens that I did it earlier than you are. :grinning: