Got stuck with a simple filtered search

I am building a simple listings search that filters listings based on selected amenities in the checkboxes. I don’t want to use a search button. I want the repeating group updates instantly as the amenities are selected/deselected.

Here is what I’ve done and where I got stuck.
My logic is as follows: when a checkbox is selected, the workflow updates the custom state of the search page (which is of type List of Amenities). Then the repeating group with the searched listings uses the custom state of the page to filter out listings based on the amenities list.

Database
I created two data types:

  1. Amenities (Field: Amenity Name)
  2. Listing (Fields: Listing Name, Amenities List)

Custom state of the search page

The data source of the repeating group with filtered listings

Workflows (got stuck here)
When a checkbox is selected I want to add an amenity to the custom state of the search page by setting the custom state and get this issue

It seems to me logical that “:plus item” operator shall work here, but it doesn’t.

Where am I wrong?

maybe try: https://bubble.io/reference#Data.Messages.CustomType.convert_to_list ,

Instead of the first search, use the current state and use the :plus item on it.

So as a result you get:

<search page’s state>:plus item…

Here is what I got. The expression looks correct and I don’t understand what’s lacking.

Try to replace :converted to list by :first item

It works! Thank you for your help!

Here is how it works (AirBnb like search)

This topic was automatically closed after 70 days. New replies are no longer allowed.