Latest working version preview link generator breaks with existing query parameters

This issue is minor but I'm sharing in case it's useful.

I've just started using releases and previewing different versions of my app. When clicking the link icon next to the "share" button, I can select a release to share: latest working version or live release. The URL that is built when selecting latest working version is broken due to multiple query parameters.

Screenshot 2024-04-05 at 1.01.23 PM

This particular app requires a query parameter to function correctly (we pass an id from another app that links to this one). When generating the working version share link, the __releaseVersion=latest parameter is added as a new set of query parameters with an additional ? to the URL instead of being appended to the existing query parameters with an &.

Here is the URL generated:
https://<my_app>>.retool.com/apps/<<app_id>>/<<app_name>>?<<my_param>>=<<value>>?_releaseVersion=latest

Here is the URL I need for my app to function:
https://<my_app>>.retool.com/apps/<<app_id>>/<<app_name>>?<<my_param>>=<<value>>&_releaseVersion=latest

Right now I manually correct the URL each time I need to preview which is do-able but tedious.

I'm using Retool Cloud 3.42.0 in Chrome browser

Hello @benp!

Thanks for sharing this. The documentation, details and screen shot are super useful.

Our apologies as currently there isn't an easier way to share data and variables between apps (but we are working on it!) as I have seen other users also using URL params to pass info such as IDs from one app to another.

I am intrigued by why the release version isn't being separated from other params with an & character. I would imagine the URL builder deep in our code base was set up without the use case of needed to pass params between apps in mind :sweat_smile: Will look into that further!

In the meantime, one alternative would be to put a variable/param in local storage and then you can access it across apps. More details about that can be found in our docs here as well.

localStorage is a flexible solution for temporarily storing data locally to the browser. All apps in your Retool organization have the same origin and share access to its localStorage.

Thanks for the reply @Jack_T!

Using LocalStorage would be a great way to get around it, thanks for that idea!

I know there's a lot for you all to support and this is so far from critical. Thanks!