How do you create user specific lists?

I’m making a recommendation app. The app database has users and places. Each user can have many recommended places. I would like to have “recommendations” as a menu item, and when the users clicks on it, they only see the places that have been recommended to them. I, as admin, control the recommendations and will update the database accordingly. I believe this can be done with “relations”, but I havent been able to figure out yet. It’s not really a 1 to 1…because recommended places can be shared across different users.

Example:
User 1 - Recommended places = A, B, D, T
User 2 - Recommonded places = A, B, C, P

Any idea how to set this up?

1 Like

I would imagine that you can create a table where each row contains the recommendation and the user’s email. Then show a list and simply filter it by signed in user.

If you want to save a few rows, then create a table of unique recommendation’s along with a unique I’d for each one. Then on a user table, create a column with a delimited list of IDs. Use a Split Text column to split that delimited list into an array, then use that array as the source of a relation column. Then you can display a list that uses that relation.

2 Likes

Thanks for this, Jeff. I created the relation in the user table, but I dont see a way to use the items in the relation to display a list. Can you elaborate a little more to help me understand?

If you have a screen with a Details Style Layout, you can add an lnline list and set the source of that inline list to the relation.

So far when I do that, it shows all rows instead of only the values in the array of the single row of the signed in user, and I dont see a way to specific the source to a more specific level of not just the relation column, but only that of the signed in user.

Do you have screenshots of your relation settings and the inline list settings?

Wow even more annoying, after writing this long thing it wouldnt let me attach more than one photo so i took a screenshot of the message. Hope you can read it…and make sense of it…

relations work only on a single match, in your case, i would use just filter “is included in”… this way you can filter multiple matches in one criterion

I think you are really close. In the screenshot of your message, your recommendations table looks to be set up correctly. For clarification, are are trying to set the tab style as a list or as a details style view? It should be a details style view, with an inline list component. The inline list should allow you to use the multiple relation as the data source. With your use of row owners, it should automatically show the correct user row and the items from the relation in that row should be what you see in the inline list.

I just want to point out though, that it appears that you have multiple rows for the same user, but the details view will only show the first matching row, which only has one recommendation in this case.

2 Likes