Introduction

Most Widgets can be configured as a link to a URL : when the user clicks on the Widget, the URL is opened.

It is possible to configure the URL to be generated dynamically : when the user clicks on different parts of the Widget, different URLs are open.

Use cases

This can be used to :

  • open another Dashboard with different context (different URL Parameters values) depending on where the user clicked.
  • open a different Dashboard depending on where the user clicked
  • open a different website depending on where the user clicked
  • open another website (for example a reporting solution) with different URL Parameters depending on where the user clicked

Configuring a Link To URL

The Properties panel has a “Link” section. Check the “Enable Linking” checkbox and choose a target type :

  • Dashboard Alias : Link to an Alias configured in the dashboard settings
  • Widget Alias : Link to a Alias configured in the widget settings
  • Web Url : Open the URL

The URL parameter field will let you configure the parameter passed to the target.

Syntax for dynamically generated URLs

In the URL string, the special syntaxes below will be replaced by a value dynamically depending on the context on the widget at runtime.

Un-formatted field value

{{!MyFieldName}}

will be replaced by the corresponding field value depending on where the user clicked on the widget at runtime.

If the field is formatted (for example, a MyDate field formatted as Month Year( MyDate )), then the replaced value will be the raw value (un-formatted).
For example : 201702

Example

If the Widget category field is Month Year( MyDate ), then you can send its value to another Dashboard with :

https://aveva.alpana.io/viewer/dashboard/MyDashboard?MyTargetParameter={{!MyDate}}

Setting the link to URL will be :

  • Target Type : Web Url
  • Url : https://aveva.alpana.io/viewer/dashboard/MyDashboard
  • URL Parameter : MyTargetParameter=***{{!MyDate}}***

At runtime, when the user clicks on the part of the Widget where the value corresponds to February 2017, then the link opened will be :

https://aveva.alpana.io/viewer/dashboard/MyDashboard?MyTargetParameter=201702

Formatted field value

{{:MyFieldName}}

will be replaced by the corresponding field value depending on where the user clicked on the widget at runtime.

If the field is formatted (for example, a MyDate field formatted as Month Year( MyDate )), then the replaced value will contain the format.
For example : February 2017
This is a value that can be used for display.

Example

If the Widget category field is Month ( MyDate ), then you can send its value to Wikipedia with :

https://en.wikipedia.org/wiki/{{:MyDate}}

At runtime, when the user clicks on the part of the Widget where the value corresponds to February, then the link opened will be :

https://en.wikipedia.org/wiki/February

Parameter value

${MyParameterName}

will be replaced by the current value of the Parameter.
If the Parameter contains multiple values, they are separated by commas ,

Example

If your dashboard contains a Parameter called MySourceParameter, then you can send its value to another Dashboard with the field Url Parameter:

https://aveva.alpana.io/viewer/dashboard/MyDashboard?MyTargetParameter=${MySourceParameter}

At runtime, when the user clicks the Widget, if the value of MySourceParameter is currently Building_A, then the link opened will be :

https://aveva.alpana.io/viewer/dashboard/MyDashboard?MyTargetParameter=Building_A

With the URL parameter, you can set all parameter needed in the target dashboard.

Examples and tips

Dynamic e-mail creation

In this example, you have a Grid displaying current maintenance issues.
You want to let users click an item in the Grid to open an e-mail to support.

The solution is to use mailto: links, with the following syntax :

mailto:someone@yoursite.com?cc=someoneelse@theirsite.com, another@thatsite.com, me@mysite.com&bcc=lastperson@theirsite.com&subject=Need%20help%20with%20...&body=Hello...

Except the recipient, all parts are optional.
Of course, with Alpana you can now generate a link like this dynamically from fields in your data !
In the Grid Widget, those fields can even be hidden.

Example :

mailto:{{:support_email}}?subject=Issue%20with%20{{:equipment}}&body={{:Downtime_cause}}%20is%20happening

Opening PDF at the desired page

In this example, you have a Grid displaying current maintenance issues.
You want to let users click an item in the Grid to open the correct maintenance document opened at the correct page.

On hosted PDF documents, the syntax is :

http://your-site.com/your-document-location.pdf#page=123

Of course, with alpana you can now generate a link like this dynamically from fields in your data !
In the Grid Widget, those fields can even be hidden.

Example :

http://your-site.com/{{:manual_name}}.pdf#page={{:manual_page}}
Last modified: Apr 18, 2023

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment