Transforming URL parameters into a list

Hey Bubblers,

I know this topic has a fair amount of coverage on these forums but I haven’t been able to find anything on here that solves for this problem.

I need to use URL parameters to set a state (text, list) in order to filter a repeating group. The filter is a multi-select language filter so I’m using advanced and intersects with functionality.

I tried using the join with operator but receive the following error when I do:

I about the floppy plugin but would like to exhaust all dev based options before turning to that.

I’ve been banging my head against a wall for two days now so any help would be more than appreciated!! :pray: :pray: :pray:

Your Custom State is a list of texts… therefore the value you set must also be a list of texts.

Right now your value expression makes no sense, so has no valid output, hence the error.

What are you trying to set this Custom State value to? The list of texts from the URL?

Hey @adamhholmes,

Thanks so much for the quick reply!!

Correct, I’m trying to set it to a list of texts. This was my original expression:

However the result that it produced did not fit the list format that I needed:

Here’s what workflow getting data from url produced:

And here’s the out put that I actually need (populated without the url workflow, just clicking filters manually):

What does the actual URL string look like?

I thought the comma was added by bubble…

Here’s the url:

You need to split the text by whatever it is joined with in the original string… in this case a comma and a space (not just a space).

Thanks for the tip!!

I just modified the split but I’m still getting the original issue. The languages are all displayed in the same format:

  1. Text 1: Arabic, Japanese

instead of being split into a list

  1. Text 1: Arabic
  2. Text 2: Japanese

I really don’t know then. It might be a URL encoding issue.

Try just ‘joining’ the items in the URL with a , that’s what I usually do and I’ve never had an issue.

Thanks man - just tried that and now I’m getting this issue. Is this what the expression you use looks like?

No that’s not what I meant… now you’re just turning the list of texts back into a single text.

I meant, when constructing the URL query parameter, join each item with a comma (instead of letting bubble join them with a comma and space and then encoding them).

The just split it by a comma in the Custom State Value.


Or, if you just split by , in your expression (i.e. an actual comma and an actual space), instead of %2C%20 it should work too.

1 Like

Okay I figured it out. I used a plugin called “Text to Array” which solved the problem beautifully! Thanks for all the help @adamhholmes

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