Create recommendation list

I have a table of allbooks that includes title and user that selected it. What I want to do is allow a user to pick a title and then find out the following: for other users that have picked this title, a list of all the other titles that those users have selected. So, if you liked title A, you will probably like titles B, C, D, E, F etc.

I have made it part way through this and am able to get an array of other titles that are associated with the selected title but am stalling there.

If you have an array, you can use a Joined List column on that to get a list of Book Titles.

Made it that far, but cannot figure out how get the list of recommendations (stored in the array and Joined List) to display in a collection

If you have an array, you can use it to build a relation that can be the source of your collection.

The array is in table A. Would a column in table B have the relation to the array? How do I convert the “horizontal” array into a vertical list?

Thank you

Match the Book Title with the array of Book Titles, and make that a multiple match.
Then use that relation as the source of the collection.

So, in table B I set up a relation from title in B to title in A. In table B I have a lookup that is the array. I get all of the titles in the lookup, but they display as one field in a list.

Use the lookup to create the multiple relation that I mentioned earlier, then use that relation as the source of a collection.

Let me try it one more time since I am just not getting it.Table A has the title of the book and an array of the other books that match it. I want to display the array.

Do I need a second table?

Thank you

No, you don’t need another table, you just need to create the relation.
The relation should match each book title with the array of book titles.

If you’re still stuck, a screen shot the shows what you have would help.

I start with title, then relate to the allbooks table, which in turn allows for the other users who have selected the title to be linked. Then I capture all of the other books that those users have selected. uniqueRecommend is the array that i want to display. (Still have to figure out why unique has dupes.)

Thank you

Have you tried adding a collection and set the source as the relation? You shouldn’t need the lookup or unique columns.

I have and it puts full array into one row with commas between titles.

I don’t think you are doing it correctly. Your Relation is related to multiple rows. The collection SOURCE should be the Relation. Not the table that contains the relation. Your collection, sourced from the relation, should be showing multiple rows because your relation has multiple related rows.

Table A has all of the books selected by all users and has a column for title and a column for user. In Table B, I have a column for title and I add a title in row one (“Harry Potter”) and create a relation from title in Table B to title in Table A. This gives me all the rows that have Harry Potter as the title in Table A.

I need a lookup in Table B that gives me the users that have selected Harry Potter. Then I want all of the other titles that each user has selected in Table A to show up as a collection.

Let me know what you think.

Thank you

I’m not sure where the disconnect is here. It might help if you regret to your actual table names instead of table A and table B.

I’m imagining in your book take a relation to the table that contains user that picked that book. Using the result of that relation you create a Lookup to get an array of all users that picked that book. Using the user array, you create a second relation to find all books chosen by users in that lookup array. That service relation should be the source of your relation.

It would really be helpful if you showed screenshots of what you have and how you are attempting to link your data together. I think you are trying to get results from dinner extra arrays when all you should need is a relation/Lookup/Relation combo.

I appreciate your patience. Let’s start at the beginning. This is screenshot of the allbooks table. In the first few columns there is the title and the user. I am trying to create a feature that works like, “Others that have read Harry Potter also read the following…” And this is where I am looking to display all of titles for any user that has read Harry Potter.

The flow would be user selects/inputs a title (Harry Potter) and then gets all of the other titles that other users have read, as long as the other users have read Harry Potter as well.

Thank you

Id imagine in your ‘Books’ table, you would have a relation linking the book title to the title in the ‘AllBooks’ table. Using the relation in the Books table, create a Lookup column to retrieve a list of users from the AllBooks table. Using that Lookup array, create a second relation in the Books table, linking the array of users to the user column in the AllBooks table. Add another Lookup column to get an array of books. Finally use that final lookup array to create a final relation in the Books table linking the array of books to the book title in the Books table.

So you should have 5 new columns in the Books table.

  • Relation(Books Title → AllBooks Title)
  • Lookup(Users)
  • Relation(Books Lookup user array → AllBooks User)
  • Lookup(Title)
  • Relation(Books Lookup title array → Books Title)

Use the that final relation as the source of your collection on the Book detail screen.


Not surprisingly, it worked. Thank you.

One issue remaining: If several users have selected the same book, it shows up multiple times in the relation that is used for the listing. I am trying to figure out if the unique feature you taught me last week has a role to play here.

Thank you

Doesn’t really matter if the the relation finds duplicates. Ultimately the end result will be a collection of unique results. Your final relation should be pointing to the Books table, which I would hope doesn’t have duplicates in it.

1 Like