GetSignatureAndWriteValue Method

Displays the Electronic Signature dialog box based on the values of the properties set in the ESignature object by a prior call to the Initialize(), InitalizeList(), IsSignatureRequired(), or IsSignatureRequiredForList(). Typically, you use this method when performing an electronic signature for FIX32 data sources. The dialog box validates the signing, sends a write request to the database, and then sends a signed operator message to the alarm system.

If verification is not required, only the Performed By section of the Electronic Signature dialog box displays. If verification is required, both the Performed By and Verified By sections display. If the tag is configured to allow continuous use, the continuous user name appears in the Performed By user name edit box. Predefined comments display based on the threshold table names passed in. If no threshold table names are passed in, the threshold table names set in the WorkSpace User Preferences, if any, are used to display the comment pick lists in the dialog box.

Syntax

object.GetSignatureAndWriteValue(nAction, pValue, [bReadLabels], [bstrZeroLabel], [bstrNonZeroLabel], [bstrDescription], [bstrPerformCommentTbl], [bstrVerifyCommentTbl], [pbValidSig], [bstrDialogCaption])

Properties

The GetSignatureAndWriteValue method syntax has these parts:

Part

Description

object

An object expression that evaluates to an object in the Applies To list.

nAction

Integer. Indicates the type of action to be performed. Valid entries for nAction include:
0 – (WRITE_VAL). After validating the signature(s), the value passed in pValue is written to the database and a signed operator message is sent to the alarm system logging the action.
3 – (ACK_OR_REMOVE). After validating the signature(s), the alarm is acknowledged and a signed operator message is sent to the alarm system logging the action.
4 – (ACK_OR_REMOVE_LIST). After validating the signature(s), the alarms in the list are acknowledged and a signed operator message is sent to the alarm system for each alarm that was successfully acknowledged. For a list requiring both perform and verify signatures, if a perform signature fails the security area check for any alarm in the list, the signature fails for the whole list of alarms and no alarms are acknowledged. An error is generated.

pValue

Variant. Contains the value to be written to the database.

bReadLabels

Boolean. (Optional). Indicates whether the zero and nonzero description labels should be read from the database. These labels format the message string that displays in the Electronic Signature dialog box and describe the action that is being signed for. Defaults to True.

bstrZeroLabel

String. (Optional). The zero description label to be used when formatting the message string. The message string displays in the Electronic Signature dialog box and describes the action that is being signed for.

bstrNonZeroLabel

String. (Optional). The non-zero description label for the message string. The message string displays in the Electronic Signature dialog box and describes the action that you sign for.

bstrDescription

String. (Optional). Message string that displays in the Electronic Signature dialog box and describes the action that you sign for. This is appended to any description that created by the object based on the nAction parameter.

bstrPerformCommentTbl

String. (Optional). Name of the Performed By comment threshold table to use to display default comments.

bstrVerifyCommentTbl

String. (Optional). Name of the Verified By comment threshold table to use to display default comments.

pbValidSig

Boolean. (Optional). Returns True if a valid signature was captured, False if not.

bstrDialogCaption

String. (Optional). Contains the caption that will display in the Electronic Signature dialog box title bar in place of the default caption “Electronic Signature.”

Return Value

This method returns HRESULT. If the HRESULT is a value other than S_OK, VBA generates an error. You can handle this error using the On Error Statement You can find out more information about the error by using Err Object.

 

Example

Applies To