Specify the Data Set Field Properties
When you add new fields to a Data Set, you need to specify the properties for each field.
The Edit Field window allows you to define the properties for a new field or edit the properties for an existing field in a Data Set.
The Edit Field window contains these fields:
- Name—Use to specify a unique name for the field. 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. The option that you select here affects the type of value that the field supports and the options that are available from the context-sensitive menu for the cells.
Where a field is to contain data that is mapped from other item(s) in the database (see Map a Property of an Item in the Database), you typically specify the same type of data as that which is being mapped.
When defining the expressions for the field’s cells, ensure that each expression calculates a value that is compatible with the type of field. (For information on entering more complex expressions, see Define the Content of a Cell in a Data Set Row.)
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 32-bit values.
- Double—The field is to contain IEEE double-precision floating point 64-bit values.
For more information on literal numeric values in expressions, see Number (Integer or Real) in the Geo SCADA Expert Guide to Expressions.
- Reference—The field is to contain references to items in the database. The items’ identifiers will form the cells’ values. Use the Table field to select the table that the field’s entries are to reference.
For information on entering an expression in a Reference field’s cell, see Specify a Constant Reference.
- String—The field is to contain alphanumeric strings. Use the Size field (see below) to specify the maximum string length.
For information on literal String values in expressions, see String in the Geo SCADA Expert Guide to Expressions.
If the Dictionary feature is used on your system, you can prefix strings in Data Set cells, in order for those strings to be replaced with another term, when displayed in a List or on a Mimic, in ViewX. For more information, see Introduction to the Geo SCADA Expert Translation Dictionary in the Geo SCADA Expert Guide to the Translation Dictionary. Ensure that you include the @ prefix within the String’s single quotes.
- Boolean—The field is to contain Boolean (0 or 1) values and display those values as ‘True’ or ‘False’. For more information on Boolean values, see Boolean in the Geo SCADA Expert Guide to Expressions.
- Time—The field is to contain date or time values.
For information on literal date and time values in expressions, see Date and Time in the Geo SCADA Expert Guide to Expressions.
- 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 Data Set’s data can decipher the data as color values.
For information on entering an expression in a Color field’s cell, see Specify a Constant Color Value.
- Size—Only applies when the Type of field is specified as ‘String’. Use the spin box to specify the maximum acceptable string length for the field’s rows.
The client application that accesses the Data Set's 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 Set.
- Table—Only applies when the Type of field is specified as ‘Reference’. Use the combo box to specify the database table that the field’s rows are to reference. The choice restricts the browser so that it only displays items in the specified table.
The Table options vary, depending on the drivers that are installed on your system. For information on database tables and the database hierarchy, see Understanding the Database in the Geo SCADA Expert Guide to the Database, and see Working with the Database Schema in the Geo SCADA Expert Guide to the Database.