Thanks for that link. Unfortunately for my use case that is not a workable method.
What I am trying to do is set up a search page to pass a list of items into a parameter. Obviously parameters currently do not accept lists, so what I am needing to do is create a custom state that is a list of texts and pass that complete list to the parameter.
One issue I have is that my filters on the page are option sets. So in my option set I have the display attribute as well as a filter attribute that basically is lowercase text with slugs if necessary ( for example: strawberry, strawberry-bannana, apple )
The main issue is that when the page is loaded with parameters already in the URL because of back navigation in the browser or perhaps URL is navigated to directly with parameters, the custom state that holds this list of values to pass as a parameter is not able to be set because of this inability to ‘add a list’
The list of option set filters (text) is unknown and not the complete list of possible values from the original list of option set filters, so I am unable to use the method outlined in the video.
I am in the process of attempting to backward implement a system because another drawback of bubble’s implementation does not allow for a filter of a list using ‘is in’ and we are only allowed to filter a list using ‘is not in’
and because of this little nuance I have to set a list that holds the complete value of my filter option set used to filter ‘is not in’, have a second list to populate based on selections made and a third custom state to store the option set value itself…because the custom state used to filter my search needs to be the actual option set values as that is what is stored on my data type, but I can’t figure how to send the parameter as an option set value.
Sounds like a head-scratching, head-banging exercise @boston85719, something I tend to stray away from. If I can’t ‘do-it’ in 10mins I drop it, but then again I am a lazy thinker. I’m sure someone will be able to provide more clarity for you.
This all works fine and there are no issues with the parameter getting set and no issue with the custom state getting set.
The problem comes from having the ability for the page on load to set the custom state value as a list by reading the URL parameter.
I was trying to take the URL parameter and translate that into a list of texts, however I am not getting a list of texts, instead I am just getting one text that has a ‘/’ separating the values as they are in the URL parameter itself.
I’m trying to allow a user to open a page using a URL with a parameter (as a list) so that the search results can accept that list to filter the results by.
It is all simple when using only a single value in the parameter or using paths as list…the problem is it seems impossible to set a parameter as a list and have it recognized on page load as a list and it is impossible to use navigate to a page to set the paths as a list
My assumption with this plugin is that it would not be set if the user is navigating to the page using a URL.
For example, I search and filter a page and then I copy paste that URL to share with a friend, I don’t think the shared URL would have the search filters set unless my search page is using the URL parameters to set the filters.
If I have the environmental variable set up to do the filtering could I share that URL and have the search filters set?
@SerPounce@nomorecode thanks for the input on this…I got something figured out that is working well. I put up a tip post to help others who want to use a parameter as a list as well as save it as a search
This was more focused on trying to get a list to be a URL parameter value and first attempt was to take a custom state list and send it to the URL parameter. But if trying to just add two lists together in a custom state in which the custom state already has values you can merge two lists as you mentioned so long as both are of same type. Generally the ‘list of additions to make’ would come from some source such as a repeating group potentially.
Not sure if that would remove any duplicates that may exist when merging though.