Pass query parameters between dashboards using links

Hi guys,

Im trying to figure out if something is possible.
I have two dashboards, A and B. They both have a (data range) dashboard parameter.
In dashboard A I have a table visualisation with a URL. This url is generated and points to dashboard B.

Now I want to know if its possible to pass on the (date range) value set in dashboard A to dashboard B.

I hope this explanation makes sense. If not please tell me and I will post a more detailed explanation :smiley:

Many thanks!

1 Like

I have the same question, thanks!

Hi @Cedrick! Welcome to the forum. I missed this post from last week. Yes you can pass parameter values by including them in the URL of a link to the dashboard. I wrote up an example of this here

Hi @susodapop,

Thanks so much for the reply! It’s very helpful and got it working for the strings, thanks so much. Unfortunately my input is slightly more complex as I use a date range and a dropdown multi select (with quotations). Is there an obvious way of passing those or should I use some magic to convert these values to strings, select them as such and use those in the query?

Many thanks again!

I don’t think my method works with multi-select list parameter types.

I’m curious to see how you would implement this!

Thanks for the reply, and no idea, I will play around with it for a while tomorrow. If I succeed I promise to post back.

As promised im posting back my implementation. It is working, but please note the implementation is hacky. I am by no means an SQL developer of anything of the sort. That being said I’ll show you my implementation. The multiselect is to select Environments, as “production”, “aceptance”, “test” etc. The date range is applied to the query.

Now the “magic”

select '%5B%22' || array_to_string(array[{{ Environments }}], '%22,%22') || '%22%5D' as env_params,
to_timestamp('{{ Date.start }}', 'YYYY.MM.DD HH24:MI:SS') as date_start,
to_char(date_start, 'YYYY-MM-DD%20HH24:MI:SS')::text as date_start_params,

And in the link property

/my-second-dashboard?p_Environments={{ env_params }}&p_host={{ @ }}&p_Date.start={{ date_start_params }}&p_Date.end={{ date_end_params }}

Thanks again for the help!

1 Like

You are the Doc Brown of SQL!

1 Like