Use the Tag Table Genie on a page when you want to be able to view variable tags where the value of each tag changes constantly within your project.
The table does not automatically populate with variable tags unless a Cicode function is called to add the tags to it. The Cicode function to add variable tag to the table is:
LibTagTable_AddTag(STRING sTable, STRING sTag)
Example 1: Populating the table with a button
In the Tag Table Genie property dialog configure the following fields:
Parameter |
Description |
---|---|
TagTable Name |
Tags |
Width |
300 ( all columns within the table are displayed. If left at 100 the value column is not displayed) |
Number of rows |
20 |
Header Height |
18 |
Row Height |
15 |
Header Padding |
5 |
Row Padding |
4 |
Column Padding |
5 |
Horizontal Scrollbar |
|
Vertical Scrollbar |
Verbar (name of horizontal scroll bar placed on current page) |
Parameter |
Description |
---|---|
Scrollbar Name |
Verbar |
Height |
100 |
Update on Drag |
True (default) |
Allow double-click |
True (default) |
Auto Hide |
False (default) |
Hidden When |
False (default) |
Action |
Up |
Up Command |
LibTagTable_AddTag("VariableTags","Bit_1") |
Variations of the example include:
LibTagTable_AddTag("VariableTags","Bit_1");
LibTagTable_AddTag("VariableTags","Bit_2");
LibTagTable_AddTag("VariableTags","Bit_4")
LibTagTable_AddTag("Variabletags", Input("Add Tag","Tag name:", ""));
Example 2: Initialized Cicode function in table configuration
Example: 'MyTagTableInitialze' initialization function:
INT FUNCTION MyTagTableInitialize(STRING sTable) INT hSession; STRING sCluster; STRING sTag; INT nError; // Add all variable tags to the tag table hSession = TagBrowseOpen("", "Cluster,Tag", "Cluster:A,Tag:A", ""); nError = TagBrowseFirst(hSession); WHILE (nError = 0) DO sCluster = TagBrowseGetField(hSession, "Cluster"); sTag = TagBrowseGetField(hSession, "Tag"); LibTagTable_AddTag(sTable, sCluster + "." + sTag); nError = TagBrowseNext(hSession); END IsError(); TagBrowseClose(hSession); // Tell the tag table initialization is completed RETURN TRUE; END
Save the Cicode file.
In the Tag Table Genie property dialog configure the following fields:
Parameter |
Description |
---|---|
TagTable Name |
Tags |
Width |
300 ( all columns within the table are displayed. If left at 100 the value column is not displayed) |
Number of rows |
20 |
Header Height |
18 |
Row Height |
15 |
Header Padding |
5 |
Row Padding |
4 |
Column Padding |
5 |
Horizontal Scrollbar |
|
Vertical Scrollbar |
Verbar (name of horizontal scroll bar placed on current page) |
Initialze |
MyTagTableInitialize("#Name") |
Parameter |
Description |
---|---|
Scrollbar Name |
Verbar |
Height |
100 |
Update on Drag |
True (default) |
Allow double-click |
True (default) |
Auto Hide |
False (default) |
Hidden When |
False (default) |
At runtime the table will look like the following:
See Also
Published June 2018