CheckESign
- Last UpdatedOct 29, 2026
- 2 minute read
CheckESign is a built-in function that electronically signs a runtime event with a user name. You can call this function to secure scripts and expressions, just as you can select the E-Sign option to secure screen objects and animations.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
CheckESign |
Security |
Synchronous |
No |
Supported |
Supported |
Not supported |
Supported |
Supported |
Syntax
CheckESign(optNumLevel,optStrUserName,optStrPassword)
CheckESign ( { | optNumLevel { | ,optStrUserName { | ,optStrPassword } } } )
optNumLevel
The security level (from 0 to 255, Runtime only) to which the user must have access in order to sign.
This parameter is optional; if no value is specified, the default value is 0.
optStrUserName
The name of a user configured in the project security system.
This parameter is optional; if no value is specified, a dialog box is displayed in the project viewer for the user to enter their user name and password.
optStrPassword
The password for the user specified by optStrUserName.
This parameter is optional; if no value is specified, a dialog box is displayed in the project viewer for the user to enter their password. (The user name is automatically filled.)
Return value
This function returns one of the following possible values:
|
Value |
Description |
|---|---|
|
-10000 |
Function called outside the project viewer, without a project viewer running. |
|
0 |
User name and/or password not accepted, or the user does not have access to the specified security level. |
|
1 |
User name and password accepted. The event is saved in the event history with the user's signature. |
Notes
Users, groups, and security levels are all managed in the project security system. For more information, see Security System.
Examples
Prompt the user for their user name and password — the user must have access to security level 20:
CheckESign(20)
Prompt the current user, as determined by the UserName system tag, for their password:
CheckESign(20,UserName)
This function is often called as the If condition in an If…Then…Else statement, so that the value returned by this function determines the result of the statement.