We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Dashboard Parameters

How to apply the dashboard parameters using API?

The Dashboard Platform SDK provides support to customize the dashboard parameter settings using following APIs.

  • dashboardParameterSettings,
  • openParameterDialog()
  • filterParameters

1.dashboardParameterSettings

This API is used to show or hide the dashboard parameter icon and apply dashboard parameters.

The dashboardParameterSettings has the below two inner level properties,

* showIcon

* data

Where,

showIcon: Holds the Boolean value and it is used to show or hide the parameter icon in the Dashboard Viewer.

data: Holds the array of value as shown in below table,

API

Description

parameterName

 

Name of the parameter.

showInPromptDialog

Indicates whether to show the mentioned parameter in prompt dialog, which will appear before applying the value.

 

showInParameterDialog

Indicates whether to show the mentioned parameter in parameter dialog with its default value.

 

value

Value of the parameter

 

 

Below code snippet is example for passing the value of the parameter:

    $("#dashboard").ejDashboardViewer({

                   serviceUrl: 'service URL',

                  dashboardPath:'Path of the dashboard',

                  dashboardParameterSettings: {

                  "showIcon":true, // to show or hide the dashboard parameter icon

                   "data":[{

                   "parameterName":"CustomerID",           

                   "showInParameterDialog":true,

                    "showInPromptDialog":false,

                    "value":"TRADH"

                         }]

                 },

        }

    );

The below image illustrates the above code snippet:

2.openParameterDialog()

This method is used to open the dashboard parameter dialog explicitly with the dashboard viewer instance.

Example

    <script type="text/JavaScript">

            var dashboardObject;

            $(document).ready(function () {              

               dashboardObject = $('#dashboard').data("ejDashboardViewer");

               dashboardObject.openParameterDialog();

            });

     </script>

 

The below image illustrates the above code snippets:

3.filterParameters

This API is used to pass the dashboard parameter by including them in the dashboard URL.

Example:

 $("#dashboard").ejDashboardViewer({

      serviceUrl: 'service URL',

      dashboardPath:'Path of the dashboard',

       filterParameters:location.search.substr(1)

});

To set the dashboard parameter within the URL follow the syntax,

@parameter = value

Where parameter represents the parameter name.

Here is the dashboard view illustrating the dashboard parameter in the URL.

To append your query string made with the parameter name and value to URL, add a prefix(?) to the query string like below:

http://<servername>//<culturename>/dashboards/<category>/<dashboardname>?@Parameter1=WILMK

Here is the dashboard preview that illustrates the dashboard parameter through URL.

How to apply the dashboard parameter for the different users in the server?

To apply the dashboard parameter

   1) Open the dashboard in the Dashboard Designer.

   2) Switch to the dashboard tab and click parameters…

The dashboard parameters pop-up will appear and in the pop-up, click add.

1) In the dashboard parameters pop-up, select the List as mode.

2) Select the type based on the values that you want to add.

3) Enter the values that you want to add and click add.

4) Click save.

Now, navigate to the server tab and click user filter…

  1) User filters pop-up will appear and click add.

  2) Choose data column pop-up will appear. You can select the parameters.

3) Enable the parameter that you want to select and click choose.

4) In the user filters pop-up, select the user and check the value that you want to add as parameter for the user and click ok.

 

 

 

5) Preview the designed dashboard as the user “Prince Solomon”.

6) Click the parameters icon, the prompt will appear.

7) In the drop-down, the value selected in the dashboard parameter for this user will be listed. Based on this you can filter the dashboard.

 

While previewing the dashboard as the user “Pavithra”, the drop-down in the prompt shows the value selected in the dashboard parameter for this user only. Based on this you can filter the dashboard.

To show the prompt dialog while previewing, please check the option “Show Prompt” in the dashboard parameters pop-up.

 

While previewing the dashboard, the prompt will appear where you can select the parameter value based on which the dashboard will be filtered.

 

 

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
8222 12/12/2017 12/12/2017 Dashboard Platform Dashboard Viewer
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.