How to let user filter items by tapping a category?

Hey, I’m making a gallery where users can post images and tag them with a category.

At the top in the gallery, the user can tap different categories to filter the images. When they tap the categories, it sets the page variable selectedCategory to the category they tapped.

To filter the images, i’m using this formula and Repeat with: SELECT(data.memories_list, pageVars.selectedCategory === item.category). This works fine.

However, it doesn’t filter the items again when the selectedCategory page variable updates, it only filters the first time a category is tapped.

I’m not sure why the variable isn’t bound to the formula, as this page says it should be:

Formula bindings are recalculated automatically when any of the dynamic parameters change. Thus, whenever I update my lastPurchaseAt page variable, my UI will automatically update accordingly.

How can I make it filter the items each time the user taps a category and the selectedCategory variable updates? I hope this makes sense. Thanks a lot.

Ok, so I got it working by selecting the selectedCategory variable as the filter for the memory_list data variable, as shown in the movie review tutorial: I’ll leave this open if it helps somebody else