REGISTRY
The REGISTRY function is only available for use in client expressions.
The REGISTRY function returns a specified value from the registry.
From Geo SCADA Expert 2019 onwards, the location at which the value is stored varies, depending on the type of client from which the function is triggered and the user that is logged onto that client:
- To use the function on a ViewX or Virtual ViewX client, you have to be logged on via a Geo SCADA Expert User Account. When you trigger the function, the value is retrieved from the server, where it is stored in the registry of that Geo SCADA Expert User Account.
You cannot use the function when accessing the database as the Guest User account, or when logged on as the Super User, on a ViewX Client. This is because the value is only cached with such users, and not get written to the registry.
- With Original WebX, the value is retrieved from the registry on the client machine that is displaying the Mimic or Trend that uses the expression. The registry entry is specific to the Windows user account that is currently logged on to that client machine. The location is typically:
HKEY_CURRENT_USER\Software\Schneider Electric\ClearSCADA\ViewX/Mimics
By using the registry on Original WebX client machines, the expression allows the same Mimic or Trend to behave differently on different Original WebX clients (as each client can have a different value).
If the value is not present, a new value is created with the specified default value. The default value can be a string or a numerical expression.
Function Name |
REGISTRY |
Description |
Returns a specified value from registry on the server (or the registry on the client machine if using Original WebX). |
Arguments |
REGISTRY(STRING, STRING or INTEGER or REAL) The first value in the argument identifies the name of the value that is to be read. The second value in the argument is the default value that will be used if the registry entry does not exist. If the registry entry already exists and has a value, the type of value you define for the second value in the argument has to match the type of value that is already stored for that entry. If the registry entry does not exist or contain a value, a new registry entry will be created using the name that is specified in the argument. The type of the new registry entry is dependent on the second value in the argument - depending on what is defined as the second value, the new registry entry will be a STRING or a DWORD. For more information on strings, integers and real floating values, see Data Types. |
Returns |
Returns a STRING, INTEGER or REAL depending on the data type of the inputs. The result is a value from the registry. |
Example:
REGISTRY('Test', 'Default String')
If the 'Test'
entry exists in the registry, the REGISTRY function will read the value and return it as a string value or integer value (depending on the type of value in the registry). If the 'Test'
entry does not exist, the REGISTRY function will create a 'Test'
entry in the registry and will apply the 'Default String'
value to it (in this case, the 'Test'
registry entry will contain a string). The REGISTRY function will then return that value from the registry.
Further Information
If required, an administrator can clear a user's registry settings: see Clear Registry in the Geo SCADA Expert Guide to Security.