Variables

Each project has its own cross-reference. When scanning the project, the cross-reference in a client project searches for uses of variables in the client project (in the design area), e.g. in the VariableName property of the controls. The cross-reference of a server project searches for uses of variables in the server project, e.g. in the Event variable parameter of the alarms. In single projects, the client and server are combined so that there is only one cross-reference that performs both searches.

The cross-reference checks for each use whether the respective variable has been defined and, conversely, whether a defined variable has been used.

Figure 1: Responsibility of the respective cross-reference for client-server projects and single projects

Legend:

The analysis is performed by the cross-reference of the client project. The starting point of the arrow indicates the source of the definition, the tip of the arrow indicates the use of the definition.
The analysis is performed by the cross-reference of the server project. The starting point of the arrow indicates the source of the definition, the tip of the arrow indicates the use of the definition.
In a single project, there is only one cross-reference. The starting point of the arrow indicates the source of the definition, the tip of the arrow indicates the use of the definition.

After scanning the project, the results are displayed in a table in the Variables view in the Cross-reference node of the respective project.

The table contains the following columns:

Variable name
Specifies the aliasof the variable.
Status
Indicates the status of use: either Correct, Warning or Error.
Status Description
Detailed information on the status.
Status Description Description of the Status
Correct The use of the definition is error-free. Correct
Defined, but no use found The variable was defined but not used.
Important: If the cross-reference is not used for a variable, it does not mean that the definition is superfluous and can be deleted for the following reasons:

The variable may have been used in the code. In Modern UI and Web UI projects, however, code files(*.cs, *.vb, *.js) are not analysed by the cross-reference. In Classic UI projects, the cross-reference analyses the code files (*.cs, *.vb), but not all code constructs can be interpreted. If variable names are only obtained at runtime, e.g. from a data source, these variables cannot be recognised by the cross-reference.

Therefore, before you delete a variable, check whether it is used in the code.

Warning
Used, but not defined The variable was used, but no definition of this variable was found. An error from the variable server must be expected in the course of the application when the application attempts to register the variable used for the first time. Error
Usage error (bit number) Accessing a single bit of a variable will trigger an error, as the data type does not support such a high bit number. Error
System
Specifies the name of the system module (e.g. variables or alarms) in which the definition is used. If Design is specified as a system, the definition is used in the design area.
Used in

Specifies the type of definition (e.g. alarm) where the variable is used in a parameter, or specifies the relative path of the form (Classic UI), view (Modern UI) or page (Web UI) where the variable is used.

Source group, source, source detail
Further details on use