You are here: Core Reference > Coding > Expressions > LINK

LINK

NOTE: The LINK function is only available for use in client expressions.

The LINK function is used to modify a URL that is returned by a property of a database item. It modifies the URL so that it includes the system on which the item is located. This is required when a Mimic on one system has a hyperlink to an item on another system.

Database items have several properties that return a URL that can be used by hyperlinks on Mimics. The URLs are used when a Mimic object is to act as a hyperlink to a database item.

As URLs do not include the system, the LINK function is required when a Mimic object is to link to a database item on another system. The LINK function modifies a URL to include the system. If the LINK function is not used, the hyperlink will only reference a local item (item on the same system as the Mimic).

For more information on hyperlinks, see Creating a Hyperlink Action in the ClearSCADA Guide to Mimics.

Function Name

LINK

Description

Modifies a URL returned as a property of a database item so that the URL contains the system on which the database item is stored. The LINK function is only for use in client expressions.

Arguments

LINK("Tag")

Where "Tag" is a reference to one of the following properties:

  • ObjectLink
  • HelpViewLink
  • Link1Link - Link8Link (Link2Link, Link3Link etc.)
  • AlarmViewLink (only available for objects that can have alarms)
  • DefaultViewLink (only available for Groups)

The Tag must be enclosed in double quotations " ".

Returns

STRING

The string is a URL that has been modified to include the system on which the database item is stored.

Example:

A Mimic named 'Site 1' is stored on a System named 'Northern Region'. It contains 2 hyperlinks—1 hyperlink to a Mimic named 'Pipeline 6' that is also stored on the 'Northern Region' system, and 1 hyperlink to a Mimic named 'Alarm Display' that is stored on the 'North West Region' system.

The hyperlink to the 'Pipeline 6' Mimic is created by animating the PickParam property of an item on the 'Site 1' Mimic with the following expression:

".Pipeline 6.ObjectLink"

The expression consists of the location of the hyperlink target (the display that is shown when the hyperlink is selected), followed by ObjectLink. When the item is selected (in Run mode), the 'Pipeline 6' Mimic will be displayed.

The hyperlink to the 'Alarm Display' Mimic is created by animating the PickParam property of an item on the 'Site 1' Mimic with the following expression:

LINK( "North West Region:Alarm Display.ObjectLink" )

The expression for the hyperlink is different to that of the 'Pipeline 6' hyperlink as the client needs to modify the URL returned by the ObjectLink property. When the client modifies the URL, it includes the name of the other system in the address. To achieve this, the LINK function is used and the location of the target display (Alarm Display) includes the name of the system on which it is stored (North West Region).


ClearSCADA 2015 R2