Show results depending of just two categories ("global variables"?)

Hi. Newbie here.

I have two categories for all the items in my database: A and B.

I just want a repeating group to shows items from my database but “filtered” by the category selected with a “button A” or “button B” :frowning:

Thanks in advance.


Hi there, @ljmolina.code… if you were using a dropdown (let’s call it category dropdown) to select the category, you could accomplish the desired result by adding a constraint to the repeating group’s data source where Category = category dropdown's value, and you would select the Ignore empty constraints checkbox to make sure all items show up when no category is selected.

If you really want to use buttons to select the categories, then you could set a custom state when either button is clicked, and you would use the custom state’s value as the constraint on the repeating group’s data source.

Hope this helps.


1 Like


This video could complement @mikeloc guidance: