GetFullname Method Example
The following example creates the ESignature object, checks to see if the node is enabled for electronic signature, displays the Electronic Signature dialog box, validates the signature and sends a message to the audit trail.
Dim ESig As Object
Dim bNodeSignEnabled As Boolean
Dim bVerify As Boolean
Dim bContinuousUse As Boolean
Dim bValidSig As Boolean
Dim PerformUserName As String
Dim PerformUserID As String
Dim PerformComment As String
Dim PerformFullName As String
Dim VerifyUserName As String
Dim VerifyUserID As String
Dim VerifyComment As String
Dim VerifyFullName As String
'Create the ESignature object
Set ESig = CreateObject("ElectronicSignature.ESignatureFactory")
'Check if node is enabled for electronic signature
ESig.IsNodeSignEnabled bNodeSignEnabled
If bNodeSignEnabled = True Then
bVerify = True ' verification is not required
bContinuousUse = True ' allow continuous user, if any, to be displayed in the dialog box
bValidSig = False ' will be set to TRUE by GetSignature if signature is captured successfully
'Display the Electronic Signature dialog box
ESig.GetSignature "Action Description", bVerify, bContinuousUse, bValidSig, Ucase(PerformUserName), Ucase(PerformUserID), PerformComment, Ucase(VerifyUserName), Ucase(VerifyUserID), VerifyComment
If bValidSig = True Then
'Send a message to the audit trail
ESig.SendSignedOperatorMessage "Action Description", "", "", Ucase (PerformUserID), PerformComment, Ucase(VerifyUserID), VerifyComment
'Get the full names of the signers
ESig.GetFullname Ucase(PerformUserID), Ucase(PerformFullName)
ESig.GetFullname Ucase(VerifyUserID), Ucase(VerifyFullName)
'Show Results
MsgBox "Action performed by " + PerformUserName + " (" + PerformFullName + ") " + PerformComment + " and verified by " + VerifyUserName + " (" + VerifyFullName + ") " + VerifyComment
Else
MsgBox "Signature was not captured."
End If
Else
MsgBox "Signature is not enabled on this node."
End If