REGISTRY
The REGISTRY function is only available for use in client expressions.
The REGISTRY function returns a specified value from the Geo SCADA User Registry.
You might be asked to refrain from changing User Registry settings while your Geo SCADA Expert system is in the process of being upgraded.
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 called 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 call the function, the value is retrieved from the database, where it is stored as part of your Geo SCADA User Registry. (The value is stored as part of your Geo SCADA Expert User Account, rather than in the Windows Registry.)
You have to be logged in to the default (highest priority) system connection for the registry settings to be saved.
If you are not logged in to the default (highest priority) system connection then registry settings will not persist, even if you are connected to and logged in to a lower priority system connection. If the default (highest priority) system connection is not working, then settings will be saved to the user account of the next highest priority system, providing that the user is logged in to that system connection.
If you use the function when accessing the database as the Guest User account, or when logged on as the Super User on a ViewX Client, the value is only retained during the logged in session with such users. These User Accounts do not retain and store the value.
- 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_LOCAL_MACHINE\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. Additionally, if using the function from an Original WebX client, a Windows Registry entry with the specified default value is created).
| Function Name |
REGISTRY |
| Description |
Returns a specified value from the Geo SCADA User Registry, which comprises part of the logged on user's Geo SCADA Expert User Account in the database (or the Windows Registry on the client machine if using Original WebX). |
| Arguments |
REGISTRY('STRING', 'STRING' or INTEGER) The first argument identifies the name of the value that is to be read. This takes the form of a string. If the string is a string literal, enclose it within single quotation marks. For more information, see String. The second argument is optional and comprises the default value that will be used if the registry entry does not exist. If this second argument is not supplied, the default value is an empty string. 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. The string argument is case-sensitive. You can create different arguments using the same word. For example, a REGISTRY function will read the string arguments For more information on strings and integers, see Data Types. |
| Returns |
Returns a STRING or INTEGER 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 return the default value.
Further Information
If required, an administrator can clear a user's registry settings: see Clear User Registry in the Geo SCADA Expert Guide to Security. (The registry values are cleared immediately. However, with a user that is currently logged on to Geo SCADA Expert, the registry changes will only become apparent the next time that they log on.)