Set urlparams value for debug purposes

I have an application that is opens another application and it uses the urlparams global variable to pass a value to the second application. In the second application, there is a table/query that uses a value from urlparams in its SQL where clause. The query looks something like this:
select * from my_table where data_set_id = {{ urlparams.hash.data_set_id }}

The problem is that, when editing the application, urlparams.hash.data_set_id has no value and so there is no data in the table to work with.

My question is, is there any way to set the value of urlparams.hash.data_set_id while in edit mode so that the query will actually return data and the table will be populated?

Hello @Bob_Shuka Welcome to the Retool Community,

You can simulate the presence of urlparams.hash.data_set_id while in edit mode by adding a fallback mechanism or temporary testing values within your Retool app.

  1. You can modify your SQL query to use a fallback value when
    urlparams.hash.data_set_id is empty or undefined.
    OR
  2. Define a Temporary URL Parameter for Edit Mode ( Set a value for urlparams directly in a temporary state or JavaScript query for testing purposes)
  3. For more information, you can prefer this Retool documentation Configure URL parameters | Retool Docs.
4 Likes