How to set filters / parameters through URL

Highly recommend first watching the intro to parameters training video. That will provide the necessary background for the below article.

Syntax

Filters / parameters can be set via URL using the parameter syntax that is appended to the embed URL (note this only works for explicit scope filters/visuals):

http://…/arc/apps/app/9 ?param.parametername=value

There are 3 types of filters, each of which requires slightly different setup.


Example

Let’s say I have a custom filter (output parameter as report_status) with two possible values – Red or Green.

We can set the default value / pre-selected filter by using the following URL:
…/arc/apps/app/10546?param.report_status=Green

image

1 Like

@shaun, can we pass corresponding row value through visual url. In below screenshot I have multiple values under subjectid and I have different visual url for each scenario. when I click on first url then it should goes to the url1 visual along with corresponding row subjectid value.

I was trying with below case statement under url field, but somehow it does work. Can explain what is the wrong I am doing.

URL field expression
CASE
WHEN [scenario] =‘RB-13’ THEN ‘https://xxxxxxxx.nam.nsroot.net:38888/arc/apps/builder/2166?param.subjectid=[subjectid]
WHEN [scenario] =‘RB-10’ THEN ‘https://xxxxxxxx.nam.nsroot.net:38888/arc/apps/builder/2175?param.subjectid1=[subjectid]
ELSE ‘https://xxxxxxxxx.nam.nsroot.net:38888/arc/apps/builder/2160?param.subjectid=[subjectid]’ END as ‘URL’

@Ganesh good question.

You need to use the string function concat() to merge the static base URL with the column value.

I would modify the calculation expression to look like this:

WHEN [scenario] ='RB-13' THEN concat('https://xxxxxxxx.nam.nsroot.net:38888/arc/apps/builder/2166?param.subjectid=',[subjectid])
WHEN [scenario] ='RB-10' THEN concat('https://xxxxxxxx.nam.nsroot.net:38888/arc/apps/builder/2175?param.subjectid1=',[subjectid])
ELSE concat('https://xxxxxxxxx.nam.nsroot.net:38888/arc/apps/builder/2160?param.subjectid=',[subjectid]) 
END as 'URL'
2 Likes

Thank you again, I was trying the same before I posted the query but any how it worked now. This would help us to navigate multiple dashboards from summary.

:man_dancing:

1 Like

Hi Shaun,

It works great, is it possible to use a link generated this way behind an image, so it works like some kind of button

thanks again for your help!!

@Carlos_Bocanegra you can use any arbitrary HTML in the table field, for example this would produce a button link:

'<a href="https://google.com" class="btn btn-info" role="button">Link Button</a>' as 'link'


Note - make sure to enable HTML in the settings

1 Like

This is great!! is it possible to mix both solutions so using the dynamic links to point to dashboard filtered based on parameters in the URL and this kind of visualization?

I don’t see why not.

Hi Shaun,

I tried with a custom filter + multiple choice parameter but does not work. Could you take a look?

…concat(…&param.parent.data="" ‘,’<parent.data:"">’ …)

@Julian you will have to provide more information like export of the dashboard, what you are seeing, and trying to achieve.

Hi Shaun,

I’m trying to set multiple items through a URL.
These items are based on a parameter I created ‘<>’ .
When the filter that is connected to that parameter sets multiple values the result is an error.
I tried concatenating the values with the parameter items.
In the last part I did: …&param.parameter.data=parameter.data:’’
With no results.