Skip to main content
InSource Solutions

TN IT329 Method to Identify a Selected Tag in the AlarmViewerCtrl Active X

InSource_Logo_Transparent.png

Description

 

This article from InSource shows a how to identify a selected tag in the AlarmViewerCtrl ActiveX.

  • Author: James Clark
  • Published: 2/27/2019
  • Applies to: InTouch 2014 R2 and above

Details

  1. Create two tags: a Memory Integer named rowNum and a Memory Message named rowName.

clipboard_ea665c868faa6cdd7ad424ba76bda7510.png

  1. Double click on the AlarmViewer control, and go to the Events Tab. Create a new Click Event script by clicking in the script field and typing in a script name (ex: GetTag).

clipboard_e6200dffab9846dd70b1315fbc8ae11d7.png

Click OK.

  1. Open the new script and enter the following script (Replacing CONTROLNAME with the actual AlarmViewer Control name (ex: AlarmViewerCtrl2):

rowNum=#ThisEvent.ClicknRow;

rowName=#CONTROLNAME.GetItem(rowNum,"Name")

clipboard_eab51ea86e5a68e4e437b1af29ee7f934.png

Validate, then click OK.

Once this is done, whenever a user clicks on a row in the display, rowName will be modified to contain the name of the tag displayed in the row selected.

  • Was this article helpful?