CordaDrill API

Search in CenterView 3.1 Documentation

Call the CordaDrill JavaScript function to enable HTML elements such as buttons and hyper links in CenterView Dashboards. This section describes how you can call the CordaDrill function from CV pages and other HTML items.

function   cordaDrill
Syntax   cordaDrill(type, reqVars, windowOpts, popupName, toClearVars)
Description   Creates a user interactive object (such as a button, checkbox, radio button, drop-down, or hyper link) that performs a dashboard-related action, including: refresh a KPI, refresh a list of KPIs, open a new window, or take control of the Web browser. The cordaDrill function can be related to a KPI, a page, a CenterView URL, or an outside URL.
Note: If you have trouble using this method, activate the Web browser's JavaScript console to see what output is generated.
Parameters   The cordaDrill function accepts the following parameters:
      type
    Specifies a type:value pair. Separate the type from the value with a colon (:). Supported types include the following:
  • popup-url-get: Opens a new window and does an HTTP GET to access the specified URL.
  • popup-url-post: Opens a new window and does an HTTP POST to access the specified URL.
  • goto-url-get: Opens the specified URL in the main Web browser window using the HTTP GET method. Specifying an external URL results in the Web browser leaving the CenterView environment.
  • goto-url-post: Opens the specified URL in the main Web browser window using the HTTP POST method. Specifying an external URL results in the Web browser leaving the CenterView environment.
  • update-kpi: Updates and refreshes the current KPI. This type doesn't require a value. This type only supports KPI objects, not pages or other dashboard components.
  • update-kpilist: Updates and refreshes the KPIs specified as the type value. The value is a comma-separated list of KPI IDs. This type only supports KPI objects, not pages or other dashboard components.
  • update-page: Updates and refreshes the current page. This type doesn't require a value.
      reqVars
    A semicolon separated list of name=value pairs. Names and their associated values are separated by an equals sign. For example, variableA=dog;variableB=cat;variableC=lizard.
      windowOpts
    Enables/disables optional components in the resulting drilldown window. Set the attribute equal to 1 to enable it, and equal to 0 to disable it. Supported values include: toolbar, scrollbars, location, statusbar, menubar, resizable, width, and height. Values for width and height options are in pixels.
      popupName
    Specifies a name to be used for the popup window's link targeting.
      toClearVars
    A comma separated list of variables that should be cleared.
Examples   A typical use of cordaDrill on a CenterView button object has an action similar to the following:
cordaDrill('popup-url-get:http://www.corda.com')

A cordaDrill example that sets some window options would look like this:

cordaDrill('popup-url-get:http://www.corda.com', null, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=300')

A cordaDrill example that sets all window options would be the following:

cordaDrill('popup-url-get:http://www.corda.com', 'variableB=dog;variableC=cat', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=300', 'new_popup', 'variableA,variableD')

A cordaDrill example of how to update a page:

cordaDrill('update-page')

The following XML is an example of a KPI that uses a button with cordaDrill:

<ct:cell valign="top"> <ct:kpi-ref src="kpis/kpi1.kpixml" title="Sample KPI"/> <ct:button action="cordaDrill(&#x27;popup-url-get:http://www.google.com&#x27;)" label="buttonText"/> </ct:cell>
Note: The single quotes in the last XML snippet have been encoded because standard single quotes are not valid in the XML.

Labels:

released released Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.