Remove an item from a user profile

I’m building an app where users can check out books. Once they return it, I’d like for the app to not display that book in their “library” anymore. How can that be done?

Hi, what is your current setup for the flow of users adding the book to their “library”?

Hey! The admin adds them to their account. The admin would still like a log of all the ins-and-outs, so deleting from the spreadsheet wouldn’t work well.

This would require a bit of Google Scripts I think.

Let’s say we have 2 sheets:

  • Books: Book name, Book image, User name (user that currently has the book), Status (Booked if a user has it, Available otherwise).

  • Logs: Book name, Event datetime (when admin changes a status of a book), Status (In if assigned to a user, Out if taken the book back from the user).

Proposed flow:

  • Admin assigns a book to a user, then it goes to an inline list shown in the user profile, the Logs sheet records it as an “In” transaction.

  • Admin takes the book back from a user, the book does not appear from the inline list anymore, the Logs sheet records it as an “Out” transaction.

Is this what you want?

I would think a simple filter would be all you need. Just filter the list so it doesn’t show books that are checked back in.

But a checked in book for one user is still of interest to another user. Make sense?

OK. I was thinking that the admin could mark the book in the log as returned, and then you could filter it out of the user’s library. If it’s more complicated than that, then this might take a bit more work and the use of templates, relations, and lookups on various sheets, but it’s hard to say without seeing your data layout and app flow.

1 Like

Figured. I’m playing around some more, but will post back with any other thoughts or ideas. Thanks everyone.

2 Likes