Combining if/then with Data query

Hey wonderful Wix fellas!!

Can someone help me figure out how to combine a if/then statement based on WixData query results.

I have a wishlist on my website, and 2 elements on my dynamic page - ‘add to wishlist’ and ‘remove from wishlist.’ I want to set it up, so onReady, the dynamic page queries the collection, if the item ID already exist in the wishlist collection (reference column), then show element ‘remove from wishlist’, else show ‘add to wishlist’ element.

Thank you in advance. Loving the Wix Code. You all have outdone yourself.

Hi,
Firstly, I’m glad to hear that you love the Wix Code product :slight_smile:
As for your query, can you please send us a screenshot of the database and the dynamic page so that we can better understand what you are trying to achieve?

Thanks,
Tal.