Add an Alarms List to a Page
- Last UpdatedJul 13, 2023
- 4 minute read
You can add an alarms list to a page using the following Genies:
-
Alarm List Genie — creates an alarm list with a header row and scroll bars.
-
Alarm List Vertical Genie — creates an alarms list with no header row and just a vertical scroll bar.
These Genies use the AlarmListCreate Cicode function to create a basic alarms list.

To apply formatting to the list rows and enable on-click commands, you can also add the List Row Genie.

Add an alarm list Genie
To add an alarm list Genie ("alarmlist" or "alarmlist_v") to a page:
-
Open a page in Graphics Builder.
-
Click the Paste Genie button in the objects toolbox.

Or, select Paste Genie from the Edit menu.
-
In the Paste Genie dialog, select the Library "sa_controls".
-
Select one of the following from the Genie list and click OK.
-
alarmlist = Alarm List Genie
-
alarmlist_v = Alarm List - Vertical Genie
The Genie is pasted onto the graphics page. A dialog box will open, prompting you to configure the parameters for the Genie.
The Alarm List Vertical Genie dialog box will show the AN parameter. The number that is displayed is AN value that was automatically applied to the Genie when it was pasted on the page.

The Alarm List Genie dialog box will include some additional parameters that enable runtime interaction with the header row. By default, the OnColumnReorderedFunction will display "ArrayView_SetFormat()". This is a system function that allows an operator to rearrange the header row columns at runtime. The other parameters can be left blank.

-
-
Click OK to close the parameters dialog box.
To load alarm data into the list at runtime, you need to call the AlarmListCreate Cicode function as an On Page Entry command in the Page Properties dialog.
-
In Graphics Builder, right-click on the page and select Page Properties from the menu that appears.
Or:
From the File menu, select Properties.
The Page Properties dialog box will appear.
-
On the Events tab, select the On page entry event.
-
In the On page entry command field, configure the AlarmListCreate Cicode function as required.

The value specified for the nAN argument needs to match the AN number applied to the alarm list Genie.
-
On the Events tab, select the On page exit event.
-
In the On page exit command field, configure the AlarmListDestroy Cicode function. For example,
AlarmListDestroy(56);
-
Click OK, and Save your page.
You can now run your project and view the alarms list.
Add the List Row Genie
-
In Graphics Builder, open the page that includes the list to which you want to add a List Row Genie.
-
Click the Paste Genie button in the objects toolbox.

Or, select Paste Genie from the Edit menu.
-
In the Paste Genie dialog, select the Library "sa_controls".
-
Select one of the following from the Genie list, based on the approximate size of the list you require.
-
list_row_x5 – use this to create a list with up to 5 rows.
-
list_row_x10 – use this to create a list with up to 10 rows.
-
list_row_x40 – use this to create a list with up to 40 rows.
-
list_row_x80 – use this to create a list with up to 80 rows.
The Genie is pasted onto the graphics page. A dialog box will open, prompting you to configure the parameters for the Genie.

Note: There is no need to adjust the size of the List Row Genie on a graphics page to fill an area. The required space will be determined at runtime by the size of the list with which it is associated.
-
-
In the ArrayAN field, enter the AN value for the associated list.
You can use the Cicode function DspGetAnFromName to retrieve the AN. For example:
DspGetAnFromName("AlarmList").
-
To enable the default set of right-click commands that are available on the default alarm page, go to the RightClickCommand field and enter the following:
AlarmPage_AlarmListOnRightClick()
If you want to use a custom set of commands, you can add your own Cicode.
-
Click OK, and Save your page.
You can now run your project and view the alarms list.
See Also
Create Priority and State Symbols for an Alarms List