When you set parameters through the URL, you can dynamically add selection options without changing the saved values of the app. It is also easy to share these settings by including them in emails, documents, and so on.
The basic syntax for URL formatting follows.
http://baseurl/arc/apps/app/id?config.output={setting: value}
where:
27.0.0.1:8000
, or sf.mycompany.org
.VALUE
.[["value1","label1"],["value2","label2"],["value3","label3"], ...,]
.The following steps demonstrate how to use parameters through URLs.
Open an existing or new dashboard where you plan to add a parameter.
If not already there, add the target visuals to the application.
In left navigation, switch to Filters tab.
Click Create Parameter. This creates a parameter in the filter area of the application.
Hover over the new filter until the controls appear on the top right.
Click the (gear) icon, to configure the filter.
In the Settings modal window, in the Values tab, specify the Title and Output Parameter. In this example, we used test and result, respectively.
[Optional] Specify one or more Value:Label pairs. In this example, we used result1:1.
In the app, check the possible options for the parameter.
In the test parameter, click Select , and notice that there are two options: No Selection, and 1.
Select 1, and hover the pointer over the (filter) icon at the top right of the app.
Note that the Current Parameters are set to result: result1
and result.alias: 1
.
Note the URL. In our example, it is http://127.0.0.1:8000/arc/apps/app/38
.
Copy this value.
In another browser window, paste the value saved in the previous step, add the code specific to setting parameters through URL, and click enter.
In this example, we are adding two more pairs: result2:2, and result3:3. The new code is in bold font, starting with '?'.
http://127.0.0.1:8000/arc/apps/app/38?config.result={values:[["result2","2"],["result3","3"]]}
In the app, check the possible options for the parameter.
In the test parameter, click Select , and notice that there are two additional options: 2 and 3.
Select 2, and hover the pointer over the (filter) icon at the top right of the app.
Note that the Current Parameters are set to result: result2
and result.alias: 2
.