Hi folks, I need help with search parameters as I fail to get my head around it.
I’m building a list of lodging options. My objective is to display amenities of every hotel room by category.
A table with amenities (e.g. Stove of type Cooking, Solo Bed of type Sleeping, etc.). Types and amenities are in the same table (Table 1):
Title | Type
Stove | Cooking
Couch | Sleeping
A table with listings (e.g. a Hotel Room 1). Each listing has a list of amenities to it for mapping purposes (Table 2):
Room | Amenities
Room 1 | Stove, Couch
Room 2 | Couch
Now to the objective. When I try to display all possible amenities on a page of a listing, it is an easy job - I just return all Listing’s Amenities (e.g. all Amenities of Room 1). That’s quickly done since Bubble allows to look up those things within 1 table.
However, when I want to call only certain amenities by their category, it isn’t obvious. For instance, I want to display a list of Sleeping amenities available in a hotel room 1. This would mean, that I need Bubble to return all Listing’s Amenities (from table 1) that have Amenity Type = “Sleeping” (looked up in table 2). Is there a way of achieving this?
One thing I tried is manual argument entry into a ‘contains’ expression but I found it operational solely when attribute’s type = text, and it doesn’t work with data types…