Setting Parameters Through URL

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.

Caution. Limitations: URL strings must use single quotes (be a valid JSON array), and usual character limitations on URL addresses apply.

The basic syntax for URL formatting follows.

http://baseurl/arc/apps/app/id?config.output={setting: value}

where:

baseurl
The ip address of the site, such as 27.0.0.1:8000, or sf.mycompany.org.
id
Unique number of the dashboard or the visual.
output
The output of the parameter or the picklist.
setting
Available option is VALUE.
value
An array of value-label pairs in the format [["value1","label1"],["value2","label2"],["value3","label3"], ...,].

The following steps demonstrate how to use parameters through URLs.

  1. Open an existing or new dashboard in Edit mode.

  2. If not already there, add the target visuals to the application.

  3. Switch to the Filters tab.

  4. Click Create Custom Filter.

    creating an unbound parameter
    Creating a Custom Filter
  5. This creates a New Filter in the filter area of the application, and opens the Settings window modal for that filter.

    creating an unbound parameter
    Initial Settings for a Custom Filter
  6. 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.

    Click Apply.

    setting parameter for url
    Preparing a Parameter for Dynamic URL Setting
  7. In the dashboard, check the possible options for the parameter.

    In the test parameter, click the (arrow down) icon, and notice that there are two options: (All), and 1.

    setting filter for url
    Initial Filter Values
  8. Select 1, and hover the pointer over the (filter) icon at the top right of the dashboard.

    Note that the Current Parameters are set to result: result1 and result.alias: 1.

    filters setting filter for url
    Filter Value Set Directly in Parameter
  9. Save the dashboard.
  10. Switch to View mode.
  11. Note the URL. In our example, it is http://127.0.0.1:8000/arc/apps/app/38.

    Copy this value.

  12. 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"]]}
  13. In the dashboard, check the possible options for the parameter. Note that options 2 and 3 now appear in the selection list.

    In the test parameter, click Select , and notice that there are two additional options: 2 and 3.

    setting parameter for url
    Filter Values Augmented by URL Settings
  14. Select 2, and hover the pointer over the (filter) icon at the top right of the dashboard.

    Note that the Current Parameters are set to result: result2 and result.alias: 2.

    filters setting parameter for url
    Filter Value Supplied by URL Setting