Automatically filter by user

The pages app we are creating allows users who are grouped by organization to favorite items by organization, so that they have one page of all the items they have favorited.

With about a dozen organization it’s a little tedious to create 12 pages or to create one page with 12 different versions of the collection component, with each one having a filter that corresponds to “equals this organization’s favorites”. That may be the only way to do It (until there is a group by function in Pages), but is there another approach I should consider that would automatically filter the list based on organization? For example, I thought about using a choice component, but I think that would only work if I have 12 different list components so I’m back to the tedium of creating those (and adding new ones if we add more organizations).

Any thoughts?

Firstly, how are you creating the “favorite” function? Are you storing the data in a user-specific column?

If that’s the case, then only the signed-in user can view their favorites.

Else if you store the organization’s name to know they have favorited a certain item, you can filter by favorite list containing signed-in user’s organization name.

To do so, make sure you have user profiles set up.

1 Like

Just for you to know (in addition to what @ThinhDinh said), you can also apply filters to the elements shown in a choice component

1 Like

Thanks for that tip. I hadn’t thought about that.

It is not a user-specific column; it is essentially the latter approach you describe. But maybe not quite as straight forward. I’m realizing my subject line was a little misleading. I’m also realizing I may need to think a little bit more about the different ways this data may need to be viewed and come back to the question. Your idea has me rethinking my approach a little.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.