Hook for "Go To Page" calls

You can intercept the call to "Go To Page" when issued from a list of alarms or tags. Do so if you have a custom page to display or want to take some action with the tag or tags


Create a module within your application named GoToPageHook

When declaring this module in AppRoot.SRC, do not add it to any class. The declaration should immediately follow the list of constant declarations:

  GoToPageHook Module "GoToPageHook.SRC";

The module must take two parameters: TagNames, Popup.

  • TagNames is an array containing the name or names the tag(s) to which you are navigating.
    (Users may select more than one tag before issuing a Go To Page command.)
  • Popup is a Boolean.
    This will be True if the user chose the option to open the page as a pop-up and False otherwise.

The module must have a return value. Return TRUE if the standard "go to page" action should be taken following the code within your hook module. Return FALSE to suppress the standard action, such as when the module is handing page navigation on its own.


1. A hook to redirect to a specific page:

  TagNames  { Array of one or more selected tag names };
  Popup     { Windowed or not                         };
Main [
  If 1;
{ Redirect to a specific page }
\DisplayManager\ShowPage("CustomPage", Popup);
] ]


2. A hook to prevent Go To Page navigation for a forbidden tag. (This simplified example assumes that the user selected only a single tag before calling Go To Page.

If 1;
IfElse(True(TagNames[0] == "ForbiddenTag"),
{ Don't let user see the forbidden tag }
{ Else }