Using "split by" to return a single text as a list

Please tell me how to split the text retrieved from a parameter by “%” and return it in a list.

For example
bubble. com?text=apple%banana%grape
is the URL

I want to return it as a list by splitting it with
and display it line by line in a repeating group.

But even if I use “split by” and separate by %, I still get
“apple banana grape”
which is a single line of text.

Can anyone help me with a solution?

well… ignoring the fact that % is not a valid URL character, the split by function works exactly as you’re describing.

i.e. it takes a single text and splits it (by the defined character) into a list of texts.

Take the following text as an example:


If you split that by the character , you’ll get a list of texts, as follows:

Now, if you simply display that list of texts in a text element, then the list will be displayed with a comma and space as the delimiter, e.g.:

apple, banana, grape

If you want do display each item in it’s own cell in a RepeatingGroup, then you’ll need to have the RG content-type set to Text, and its datasource be that list of texts.

So, what exactly are you trying to do here? (and why does your URL contain invalid characters?)

1 Like

Thanks, I understand everything. So the “%” was doing something bad. I tried it again with other symbols and it worked fine. Thank you for your help.

Note that what I wanted to do is a general search function.
Like, for example, when looking for coffee beans in an online store, you can select multiple countries of production, and it will show you the data that applies to one of the choices.

1 Like

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