Send Custom State List As Parameter to Another Page?

@NigelG Thanks for this - brilliant!

EXCEPT! Bubble does a weird thing and converts the % in the url to %25 (apparently this is a thing) - which means the parameter looks like param=itemA%252C%2520itemB%252C%2520 and regex won’t pick it up.

So I did essentially the same thing, but I used a simple string as a delimiter (in the example below, I’m using x123x), and then the split-by function to break apart the items:

FIRST: Set the (text) parameter to [id-or-whatever-of-thing]:append"x123x"[next-thing’s-id-or-whatever] (and keep appending until you’re done with your list)

So if I’m sending a list of fruit, for example, it’ll look like this:

fruits=applex123xpearx123xbanana

THEN: If you need to extract items from the list, you use the :split-by function:

get fruits from url:splitby"x123x"

NOW: This will result in a list of texts. So if what you really need is a list of things in your database or options from an option set (assuming you sent the ID or Display of those things when you sent the parameter), then you need to either search for or get an option that matches the string you sent through for the items in the list.

Let’s say you’re pulling your fruits from an option set. In order to end up with a list of the matching options, you’ll do this:

  1. Get an option
  2. All OS Fruits
  3. Filter
  4. get fruits from url:splitby"x123x" (this gives you that list of texts) “contains” This OS Fruits's Display (this will give you the list of options matching what’s in the parameter)

So how your URL ends up looking like when you do this? :slight_smile:

App.name/{home}/fruits=apple,pear,banana

Will be the list items, with the delimiter you choose in between each item. If my delimiter is ‘x123x’ then it’ll look like this:

ap.name/{home}/fruits=applex123xpearx123xbanana

Not the prettiest thing in the world, but it works. :slight_smile:

So great to see lists of fruit being a thing in the forum again :joy::joy: