Cicode Programming Reference > Cicode Function Categories > Security Functions Introduction > MultiSignatureTagWrite

MultiSignatureTagWrite

Displays a form that allows up for 4 users to have their credentials verified in order to approve a write of a specific value to a specific tag. If all users are verified successfully, the write to the tag is performed by this function before it returns. The usernames can be Citect or Windows users.

Syntax

MultiSignatureTagWrite(sTagName, sValueToWrite, sLogDevice, sUser1, sUser2, sUser3, sUser4)

sTagName:

The name of the tag to which a write needs to be approved.

sValuetoWrite:

The value to write to the tag if approval succeeds.

sLogDevice:

The name of a log device if logging is required, otherwise pass an empty string.

sUser:

Each sUser argument needs to be either a Citect user name, a Windows user name (including domain\ prefix) or an empty string. Even though the sUser arguments are numbered 1 through 4, this only controls the order in which users are displayed on the multi-signature form. You can pass empty strings for any of these arguments, but at least one user needs to be specified.

Return Value

TRUE (1) if the operation was approved (that is all users' credentials were verified and the operator clicked the "Approve" button, otherwise FALSE (0).

Related Functions

FormSecurePassword

MultiSignatureForm

VerifyPrivilegeForm

VerifyPrivilegeTagWrite

Example

// This example generates a form to request two users to approve the tag write
operation.
// When approved, the PLC_VAR1 tag is written with the value 123 and a page string
// is set to indicate the approval status.
IF (MultiSignatureTagWrite("PLC_VAR1", "123", "", "John Smith", "Angela Huth", "", ""))
THEN
PageSetStr(1, "TagWrite Successful");
ELSE
PageSetStr(1, "TagWrite Not Successful");
END

See Also

Security Functions

Form Functions