Dynamic key value parameter

Hello fellow Bubblers,

I’m facing a challenge with a project and could use some advice. The requirements involve passing dynamic keys and values as parameters. In the ‘Go to Page’ workflow in Bubble, we can select dynamic values, but the keys must be hardcoded.

I tried using the ‘Run JavaScript’ action, which works to some extent, but then I can’t use ‘Get data from page URL’ as the parameters don’t update live when changed through JavaScript. Unfortunately, none of the plugins I’ve tried have resolved this issue.

Is there a way to achieve the following?

  1. Pass dynamic keys and values as parameters.
  2. Retrieve these parameters live using ‘Get data from page URL.’

Thanks in advance for any guidance you can provide!

“Pass dynamic keys and values as parameters”
0QGp1xYeFz

“Retrieve these parameters live using ‘Get data from page URL.'”
ZIIXnsE5Ey

This is dynamic. You’re able to select any value, search for any value, and read any value on page load or whenever you need it.

You shouldn’t need to use “Run Javascript” to do these easy operations unless you’re trying something complex.

Thank you for your response @GH5T .
Although I don’t see how we can use dynamic keys here? You had hardcode the key to ‘Page’ and made the value dynamic, thats simple. Is there any way we can make the key dynamic? Example replace ‘page’ with Current user’s Name?

The question is why do you want to make that dynamic?

Your most ideal scenario would be to make a “dedicated page” or “Group” for a “User” and then apply dynamic properties after that page.

You can use path-name "site(dot)com/“path-name1”/“path-name2"” and then get those results from the same data source “Get Data from URL” and get the path-name from the list. This way however, you’ll have to work-around the “version-test/” path as well when working on development.

I want to make it dynamic for API calls within my app.
The custom API call is a ‘Get’ call which accepts URL parameters and have a million possible key/value combinations which is all dynamic

Kind of similar like selecting filters on an ecommerce store.
Example ecommerce.com/search is a page and i want to search for clothing category for men, the URL becomes ecommerce.com/search?clothing=men.
Then i apply another filter for color blue, hence the URL becomes ecommerce.com/search?clothing=men&color=blue

These filters goto the URL so it’s copy/pastable and then from URL to API calls.
Apologies if I wasn’t able to explain this clearly, but the use case is: We need to be able to make ‘key’ parameter in URL dynamic. Any solutions?

You need to make a solution for each key.

You mean hardcode each key with conditions? Client currently has 10k+ keys and it will keep increasing exponentially as the product grows

You can use ‘Open an external website’ (instead of a Go To Page action).

Then you can construct the URL dynamically, however you like.

Tried that but it always reloads the entire page, taking a couple of seconds, and is not as quick as ‘Go to Page’

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