Written by

Sales Engineer at InterSystems
Question Randy Stewart · Jun 13, 2016

How to pass multiple values for a FILTER to DeepSee DASHBOARD on URL

I need to pass multiple values to a FILTER to a DeepSee DASHBOARD via the URL. The documentation seems to indicate this can be done, i.e.: "Where each filterspec is filter_name.filter_values" but there are no examples I can find that indicates what is used to separate multiple values. Say I want to pass the three values 5, 6, and 1395 to a filter. To pass just the 5 I know this works:

&SETTINGS=FILTER:LEAD.MYUSERID.H1.MYUSERID.5

but how do I include 6 and 1395. None of the following seem to work:

&SETTINGS=FILTER:LEAD.MYUSERID.H1.MYUSERID.5.6.1395

&SETTINGS=FILTER:LEAD.MYUSERID.H1.MYUSERID.5,6,1395

What is the proper syntax?

 

Thanks.

Comments

Alexander Koblov · Jun 13, 2016

Hi Randy.

FILTER option in SETTINGS references "Allowed Default Values for Filters" section of doc http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=D2IMP_ch_settings#D2IMP_filter_default_values

You can specify set of members as follows:

"{&[keyval1],&[keyval2],&[keyval3]}"

Then you need to URL encode this value: http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=D2IMP_ch_dashboards#D2IMP_dashboard_url_encoding

Particularly by replacing & with %26 and , with %2C

For example, if I want to pass to "Basic Dashboard Demo" several values for Home Zip Code filter I need to create following string:

&SETTINGS=FILTER:[HomeD].[H1].[ZIP].{&[32006],&[32007]}

And then URL encode it to

&SETTINGS=FILTER:[HomeD].[H1].[ZIP].{%26[32006]%2C%26[32007]}
0
Randy Stewart  Jun 13, 2016 to Alexander Koblov

Thanks for the explanation and the examples. I had read the documentation several times but it did not make sense without your explanation and examples.

0