"Item in List" for Documents?

Actions & Logic

I am a newbie and probably missing something very easy and thinking about this incorrectly, but I've tried a lot of alternatives and feel stuck.

I have a books collection and a users collections. Under the users collection I have a sub-collection called bookmarks.

On my search page, I have a list view of books populated from the books collection. For each item, there is a "bookmark" button with the goal of saving the book with notes and tags to the users bookmarks subcollection.

I have two bookmark buttons, unfilled and filled, to toggle between depending on if it has been bookmarked for that particular user.

My goal is for each book item to check the bookmarks subcollection to see if it exists and to choose between the two buttons, but I cannot figure out how to set up the conditional logic to do that.

Collections setup:

Item in the list with the two bookmark buttons:

What have you tried so far?

I thought about using a Document Reference list, but I have other information (notes and tags) that I want to associate with the bookmark so I made it a subcollection.

Preferably, I would like the bookmarks subcollection to be accessible under the Authenticated User, but it does not look like this is possible?

As a workaround, I placed a Backend Query on the search page to query the bookmarks subcollection for that user. This is working, however, because bookmarks is a set of documents, it doesn't seem possible to do a "is in list" to verify if the book reference ID is in the bookmarks documents.

I have gone through many combinations of the conditional menus and cannot figure it out. I have looked at filtering the bookmarks documents, but when I select filter in list and try to select bookID, it will not populate the document property field.

Is there a way to convert the bookmarks documents into an array? Am I setting this up incorrectly in the first place?

Backend Query for bookmarks documents:

Trying to filter bookmarks documents but it will not let me select bookID (it is not red, it just immediately disappears)

Did you check FlutterFlow's Documentation for this topic?
Yes