Create User Lists of Items

I’m struggling to accomplish something that I would have thought to be simpler and I can’t seem to find any examples on here.

I have a list of items that is the main content of the app. What I want to accomplish is to allow users to create multiple named lists of their favorited or bookmarked items. You see this sort of thing in many apps (AirBnB, for example lets you create multiple lists of favorites items with each list having a different name). I’ve created a table called user lists which I have successfully create a form to allow users to create named lists that only they can see. But haven’t figure out how to be able to create a form in which, while browsing the main list of items, they can click on it and add it to one of their lists.

This is close:

But this assumes only one list, (also, I don’t see how that’s functionally much different than the built in “Favorites” function, but maybe I’m missing something that would tell me how to use this to accomplish my goal). What would be an ideal expansion of what is described in that post is that the user clicks “Add to my lists” and can choose one of their existing lists to add the item to.

Any suggestions or links to other posts that I may have missed that describe how to build this functionality?

You’re on the right track. Here’s what I would do:

  1. In the sheet of items, create a user specific text column called userList.
  2. In your user_lists sheet that you already created, add a rowID column. Create a multiple relation column called rel_userListItems that points the rowID column to the userList column in the items sheet
  3. On the details screen of each item, place a choice component that has a source of the user_lists sheet.
    • Values = rowID, Display = listName, Destination = userList column
    • It should be filtered to where email is the signed in user so each user only sees their own lists.
      from the user_lists screen
  4. Now, each listName has an individualized list of items. Display the rel_userListItems relation in an inline list on the details page of each list created in the user_lists screen

Thank you! That worked like a charm and I learned something in the process. I didn’t realize that the choice component writes the value immediately. It doesn’t need to be in a form with a submit button. Whoop!

But it did point up an additional issue:

This solution works great if each user only wants to put each item on one list. But I was hoping that “Item ABC” could be on User1’s “My First List” and also on “My Second List”. This solution only allows each user to have a given item on one list. Any ideas how to have the same item on multiple lists? Probably a tad more complicated…

Yes, it would be more complicated. You’d probably need to use our trebuchet method which is too lengthy/involved to type out. Search the forum for the Trebuchet method if you’re interested.

1 Like

Hey there - this was super useful, but unfortunately doesn’t quite work.

I have a main user list, and want them to select from a list of companies. Each has a profile and info and I want to let users toggle ‘Add to my list’ and from there they will then be displayed in their profile.

I can’t seem to get this to work but followed the above instructions.

So does each user only have one list, or multiple lists?