I have a visualization where I’m building a link to another report. When the dashboard loads, the link looks something like:


What I’ve found is that the link works in Chrome, but if I do the same thing in safari I get an error that says “Error running query: missing values for StartDate, EndDate parameters.” After playing around a bit, I noticed that if I change the date format in the query string to be YYYY-MM-DD it works. So this would be the corrected link.


Is there anyway for me to address that in my url template? This is what I currently have for a template:


I don’t really understand why it works for Chrome but not Safari… Running Version: 7.0.0+b17535 (15c815fb)


What version of Redash are you using?

Just noticed that you did mention the version you’re using :flushed:

The StartDate values in the URL template – they come from a DB column?

So your question rang a bell with me. Basically, what I did was I added the parameters as hidden columns to the table visualization with the following:

, StartDate = cast(datepart(yyyy, ‘{{StartDate}}’) as varchar(4)) + ‘-’ + cast(datepart(MM, ‘{{StartDate}}’) as varchar(2)) + ‘-’ + cast(datepart(dd, ‘{{StartDate}}’) as varchar(2))
, EndDate = cast(cast(datepart(yyyy, ‘{{EndDate}}’) as varchar(4)) + ‘-’ + cast(datepart(MM, ‘{{EndDate}}’) as varchar(2)) + ‘-’ + cast(datepart(dd, ‘{{EndDate}}’) as varchar(2))

That was the culprit for stripping out the leading zeros.

What I did now was I switched the above:

, StartDate = ‘{{StartDate}}’
, EndDate = ‘{{EndDate}}’

And I formatted those with ‘YYYY-MM-DD’ in the table. The issue now is that the URL that is being built for the link includes the full datetime instead of the formatted dates. Any suggestions to get around that?


So I got it to work with a hack… I formatted my dates and concatenated with dummy parameters. That kept the column from getting automatically converted to datetime. I’m hiding these columns so no one can see them. The link get’s built correctly with the extra parameters but they just get ignored by my second dashboard.

    , StartDate = CONVERT(VARCHAR(10),'{{StartDate}}', 120) +'&p_ignore1=1'
    , EndDate = CONVERT(VARCHAR(10),'{{EndDate}}', 120) +'&p_ignore2=1'
1 Like