Skip to main content
Kinetic Community

URL Click Handler

 

A URL click handler will open a browser to the configured URL, passing in all defined user parameters and values.  An example configuration of a URL click handler is shown below:   "clickHandler": { "type": "url", "target": "_blank", "callback": "http://changes.kineticdata.com", "showDialogFirst": "false", "parameters": [ { "name": "id", "value": "{{sourceMapDatasourceValuesKeyId}}" }, { "name": "name", "value": "{{sourceMapName}}" }, { "name": "start", "value": "{{sourceMapStart}}" }, { "name": "end", "value": "{{sourceMapEnd}}" }, { "name": "category", "value": "{{filterFields['700000001']}}" } ] }   URL click handler properties: Property Name Required? Description type Yes Defines the type of click handler so Kinetic Schedule knows how to process it.  Must be "url" for URL click handlers. callback Yes The URL the browser window opens to. target Yes Determines where the browser window opens the URL: _blank - opens the URL in a new window or tab.  This is the default. _self - opens the URL in the same frame as it was clicked. _parent - opens the URL in the parent frame. _top - opens the URL in the full body of the window. framename - opens the URL in the a named frame parameters Yes A list of query parameter names and values that should be appended to the URL. These query parameters provide additional details to the target system.  Parameter values can be hard-coded (static) strings, values from object properties, or a combination of both.  For a list of available object properties that can be used in parameter values, please see the click handler page. showDialogFirst Yes A value of "true" will prompt the user for confirmation before running the clickhandler.  A value of "false" will run the clickhandler immediately without prompting the user for confirmation.

URL Query Parameters

Query parameters contain specific object information that is passed on to the target system. In the click handler code listing example above, the resulting URL will result in:

http://changes.kineticdata.com?id={{sourceMapDatasourceValuesKeyId}}&name={{sourceMapName}}&start={{sourceMapStart}}&end={sourceMapEnd}}&category={{filterFields['Category']}}

The special mustache notation (double braces) surrounding some of the paramter values indicates that these values should be substituted with real data that corresponds to the provided property name.

After Kinetic Schedule parses and encodes all the properties, the URL contains very useful pieces of information that the target system can use.  In the example, the URL becomes:

http://changes.kineticdata.com?id=CHG000000000278&name=Outage&start=2012-09-13T13%3A00%3A00&end=2012-09-13T15%3A00%3A00&category=Network&20Systems

 

Example of a mixed-content URL parameter that uses both event properties and static text:

"parameters": [
    {
        "name": "summary",
        "value": "{{sourceMapName}} starts at {{sourceMapStart}}, ends at {{sourceMapEnd}}"
    }
]

 

In this example, the "summary" parameter is built up as a concatenation of the name, start, and end properties for the event, along with some static text to give the parameter value more of a human readable syntax.