URL parameters on bubble

Hello guys, I’m new to bubble and i’m creating a chat app and i need help with “URL parameters”

I have a repeating group of conversations and a repeating group of messages on the left and right side respectively

i use the “Display data and Data to send function in my workflows” but each time i refresh the page, the data dissappears

I figured out that if i could get the conversation’s unique id or some stuff like that to the url when i click on a particular conversation, then i wouldn’t lose data if i refresh the page

But i don’t know how that works

Please, i need someone to tell me how this works
Any clue is highly appreciated.

In Bubble workflows you would use the navigation go to page workflow.

Screen Shot 2023-08-25 at 1.27.58 AM

Then on that workflow you would use the feature of add more parameters to page…add the key name to whatever you want it to be (in screen shot below I called it conversation)…you can then send the data you want. You can send whatever you want and bubble will automatically URL encode the value for you. In my screen shot I’m sending the unique ID of the conversation for a specific reason.

Screen Shot 2023-08-25 at 1.30.21 AM

The reason I send in the unique ID, is because when I want to extract the value from the URL, Bubble will automatically know which conversation it is.

To extract the value use the Get data from page URL dynamic expression.

Screen Shot 2023-08-25 at 1.31.50 AM

This dynamic expression can be used anywhere, in my example I’m just using a text element, but you can use it as a datasource for a repeating group or even in workflow actions.

Then you need to tell it what is the name of the parameter and what type of data (the default is text)…in my screenshot I use the data type of conversation for the purpose of having Bubble automatically detect which conversation from my database the unique ID in the URL parameter belongs to and will give me access to all the data belonging to that entry.

When I first learned about URL parameters, I read blog posts on the internet about URL anatomy and how to use parameters and paths. It opened up a whole new world for me within Bubble and how I handle passing data and much more. I use it for navigation, as well as search filters and notification systems to name a few.

2 Likes

Thanks alot for this
This alone is enough information
God bless you

1 Like

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