Issue using :Split By for Filtering When setting State on page URL

I am using a Repeating Group list of Texts for the Filtering of Products. I set the list of texts to state and then send them to the page URL via Get data from page. Then using Split By to turn the text into an array so I can have multiple filters selected.

My problem is some of the text has commas in it like this ", " which is what I use to split things into an array. I haven’t been able to find a workaround that still accurately works with the filters while also splitting into an array.

Here’s a image

Filter

Is there any way to use :Split By to set it to break on something else while keeping the List Text so I can filter for my repeating group? Nothing I’ve tried so far seems to work.

Hey @mack2580 , try the following:

  • Where you’re first setting the list of texts to a state, use the modifier “join with” and join the list with a different character like a hyphen.
  • Now you can split by that hyphen instead of a comma. This will keep the commas for any list items that should have them.

I hope I was following your issue and that the above move you forward.


Cheers, Gaby
Co-Founder at Coaching No Code Apps
Free Bubble Masterclass
Private Help

That was incredibly easy solution thank you so much! For anyone else that has this problem you have to use join with on both the plus and minus of the state otherwise when you unselect the filters it was bug out.

1 Like

Hey, Gaby quick question if you get a chance. I’m doing the exact same thing but I’m using option sets as it seems to be a much cleaner option for me. Originally I was using a text list. When I go to the final entry to set the state I get this error. Any suggestions?
I’ve converting into a list of text. in the Get data from url with no luck

Here’s is how I send the data

Platform

error

It’s probably because the Custom State is expecting a list of Platforms, but when you do “Platform:each item Display join with ;” they are converted to text.

You would need to change the Custom State’s type to text or perform comparisons while filtering.

Could I do a comparison when setting the state?

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