Adding to/ subtracting from an array

I have a Users Table and a Books table. When a user selects a book an entry is created in the Books table with title and username. I would also like to add the title to an array in the user’s profile, so as a user selects and deletes titles the titles are added to or subtracted from the array.

Any direction on this would be appreciated.

If the Books table has a username, then you should be able to create a multiple Relation linking the user table to the books table. Then create a Lookup column that uses the relation. That will be your array.

3 Likes

Thank you

1 Like

Problem I now have is that when I use the relation for a collection, it always shows the first row, no matter which user I am viewing as. Everything looks good in the users table (relation column has the correct data), but the collection list using the relation just does not move off the first row. Any ideas are welcome.

Either your relation is not configured correctly, or you are not using the relation as the source of your collection. Would have to see how you have everything configured to say for sure.



See if this helps

I don’t see anything wrong there yet. How is the collection set up? What exactly do you mean when you say that “it always shows the first row, no matter which user I am viewing as”?

1 Like

If I am signed in as the user in row 1, the collection shows the the four names in allbooksUsers. Same four show up if I am signed in as the user in row 2, row 3, etc.

Do you have any filters for your tab? It should be filtered to something like “email is signed-in user”.

2 Likes

Resolved. I was launching the collections page on a standalone basis. Once I added a button from the user profile screen, the collection picked up the correct row.

Thank you all.

2 Likes

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