Specify the Field Properties
For each item of data that a Data Table is to store, you need to include a field of the appropriate type in that Data Table (see Add Fields to a Data Table). You add the fields in the order in which the field’s column headings are to appear when the table’s data is displayed as a List.
When you add a field to a Data Table, or Edit an Existing Field, you use the Edit Field window to specify the field’s properties:
- Name—Use to specify a unique name for the field. The name appears as a column heading when operators display the Data Table’s entries as a List.
The Name has to begin with an alphabetic character, and can thereafter contain a mix of alphanumeric and underscore characters, but no spaces.
- Type—Use this combo box to specify the type of data that the field is to contain.
Specify the required field Type from these options:
- Byte—The field is to contain unsigned 8-bit values.
- Word—The field is to contain signed 16-bit values.
- Unsigned Word—The field is to contain unsigned 16-bit values.
- Long—The field is to contain signed 4-byte (32-bit) values.
- Unsigned Long—The field is to contain unsigned 4-byte (32-bit) values.
- Long Long—The field is to contain signed 64-bit values in the range –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
- Unsigned Long Long—The field is to contain unsigned 64-bit values in the range 0 to 18,446,744,073,709,551,615.
- Float—The field is to contain IEEE single-precision floating point values.
- Double—The field is to contain double-precision floating point (64-bit) values.
- String—The field is to contain alphanumeric strings. Use the Size field (see below) to specify the maximum string length.
- Boolean—The field is to contain Boolean (0 or 1) values and display those values as ‘True’ or ‘False’.
- Time—The field is to contain date or time values. When displayed as a List in ClearSCADA, the field’s values use the syntax that is defined by the user’s Date Format. When displayed in an external application, they use the Date and Time format specified by that application.
- Color—The field is to contain color values in RGB format. For example, RGB(255, 255, 128) for bright yellow. Only select this option if the client application that is to use the Table’s data can decipher the data as color values.
- Size—Only applies when the Type (see above) is specified as ‘String’. Use the spin box to specify the maximum acceptable string length of the field’s contents.
The client application that accesses the Data Table may use the size, for example, to truncate any strings that are longer than this size. There is no limit to the length of a string within a Data Table.
- Attribute—You can optionally use certain types of field to control the color or blink attribute of each record (row) in a Data Table. The value that is assigned to such a field determines the color or blink status of that particular record. Foreground, Background, and Blink attribute-assigned fields do not appear as columns when the table’s data is displayed in List format.
If such attributes are used in a Data Table, ensure that only one field in the table is assigned to each Foreground, Background, or Blink attribute.
If no fields in a Data Table are used to determine the color or blink attribute of the records in that table, the records are displayed using the Windows’ color defaults (typically black text on a white background), whenever the table’s data is displayed as a List in ClearSCADA.
Use the Attribute combo box to specify whether the color or blink status of each record’s entries are to vary, depending on the value of this field, whenever the table’s data is displayed as a List.
- None—The value of this field does not determine the color or blink status of the Data Table’s records.
- Foreground—Only applies if the field’s Type is set to Color, Long, or Unsigned Long (see above). Select the Foreground option if the value of this field is to determine the foreground color that is used to display the records’ entries.
- Background—Only applies if the field’s Type is set to Color, Long, or Unsigned Long (see above). Select the Background option if the value of this field is to determine the background color that is used to display the records’ entries.
- Blink—Only applies if the field’s Type is set to Boolean (see above). Select the Blink option if the value of this field is to determine whether the foreground of the records’ entries flash. When displayed as a List, a record flashes when the value of this field is 1 (True), and does not flash when the value is 0 (False).
- Indexed—You can use indexing in your Data Tables in order to speed the sorting and filtering of data in those tables. When indexing is used, only the indexes are searched or sorted, rather than the actual data records.
To index a field, ensure that the Indexed check box is selected. With Data Tables that are expected to contain numerous records, we suggest that you index each of the fields on which operators are likely to either sort or filter the data.
Leave the check box clear for those fields that are unlikely to be used for sorting or filtering the table’s data.