Thanks for the quick reply. I’ve tested it by setting it to “text type” and indeed works. Would you have any idea why it is not working with type = an option set?
because your parameter is not an option set, it is a text value…when sending the parameter to the URL it is sent as a text value
Yes true. But it is possible to “transform” the parameter to be of the the option type. So you can use it to e.g. filter search results from the database of the same type. In example below the type “optionListingType” is an Option set-
But it only works with one parameter value, not a list of them. I’ll try to figure it out maybe with using text and states instead as you do.
Hi all , same problem here , trying to retrieve a parameter and converting it back to list, so I can use a constraint “is in” or “contains” from a list.
Did you try to follow the steps in this thread?
Thank you immensely! That ‘is not in’ threw me for a loop.
Update to this Tip
If you are using an approach to displaying your results that incorporates a reusable element, you would not be able to use this method…and in fact this method may be able to be adjusted using the following approach and avoids the multiple custom states for ‘is in’ vs ‘is not in’
You can do this without using any custom states
Essentially the extract with regex pattern takes the parameter and turns it into a text list so that the contains and doesn’t contain functions associated with lists will work.
Here is how to add it as a filter
I actually ended up needing to filter some results and it works very well…I have a data type of Meetings with a related Data type of ‘Event-Types’
I set up a double filter to get to filter my results using the reusable element
The second portion of this ‘double filter’ is shown just above: the first portion is below
All of this would mean the use of multiple custom states as explained in the first post is probably unnecessary overall and you could just use this strategy of the extract with regex pattern.
I love this! I have a complex filter search that is saved by the users. It’s a bloody headache every time I need to update it with states all over the place needing to be populated, updated and whatnot.
After reading this I immediately ripped all of that out and swapped for this set up.
What issues did you run into with a reusable element? I’m using it within one and can’t find any obvious issues.
None. No issues. It is actually one of the best ways that I have found to allow a reusable element to communicate with pages and other reusable elements.
I am new to bubble. This sounds amazing. I have encountered a need to pass a list of option sets.
But your example is a bit too complicated for this beginner bubbler. It would be great if you can use a simpler example that is easier to understand. One can hope.
Thank you @boston85719 for this detailed explanation.
Here is my need : I want to filter a Repeating Group with option sets and that the URL is updated with the selected option sets (cf. my post here)
I want to try your solution without the daisy chain as initially indicated in my post).
I followed all your steps.
Here is my searchv2 page editor :
Here are my searchv2 page workflows:
Here is my searchv2 page preview :
When I click on one or several option sets, the URL is correctly updated
However I cannot figure out what to do to have the Repeating Group to display the list of Thing that matches the selected filers/the URL parameter. Do you have any suggestion?
I am quite new to Bubble so I have followed your steps without understanding ALL the choices you made and I think I miss something quite basic.
Need to use Advanced filter if filtering a list field with a list of filter choices.
I tried to filter the RG with the custom states of the page but it is not working :
Here my custom states :
I replicated the same as yours.
I am not sure that I should filter the RG with the custom states of the page. What would be your recommandation please?
The point is to use the URL parameters as the filter
Thank you for your answer @boston85719
I have tried to follow the steps described in your update but it seems too complicated for my actual Bubble knowledge.
I do not understand the logic enough to replicate it in my context.
If we take my example, I want to filter Plants according to Growth rate (Slow, Medium, Fast).
Data type Plant has a field Growth:
which is an Option set :
To start from the basic, does your solution work with Multi dropdown (Growth Multi dropdown in the screenshot below) OR it has to be a RG that is displaying the option sets available (Growth RG in the screenshot below) OR it only works for element with one single choice possible like a classic Dropdown?
It will work for multiple select elements as the idea of a list is multiple values
Ok perfect thank you, in this case I prefer to use a Multi dropdown element in my case.
For this step above in your example I have done this on my side:
Then, for your second step above here is what I have on my side:
I cannot figure out what constraint I should put for the :filtered operator.
Do you have any idea?
No idea because I have no idea what data you are filtering, what are your filters to choose from or where you are storing your users selected filters.
If you are interested in scheduling a personal training session, feel free to book one through Bubble’s coaching marketplace with me.
I think I have found a solution for this expression: I do not use a :filtered operator but just key “growth”=
This Multidropdown's value:each iteam's Slug
I take note of the personal training session in case of need in the future, thank you for your help!