rajiv-nagpures…

In a document with multiple signatures how to insert the date of the first sign

0 votes
I am using the Silanis.ESL API in C# and am having the following issue. In a document with multiple signatures I would like to insert the date of the first signature (chronologically) at a specified location on the document. Thank you!

Reply to: In a document with multiple signatures how to insert the date of the first sign

0 votes
Hi Rajiv, What does the "chronologically" refer to by client? Do they mean the first signed signature, or simply the first signature appears in the document? For the latter, you can use the sample code like below:
EslClient eslClient = new EslClient(API_KEY, API_URL);

           DocumentPackage pkg1 = PackageBuilder.NewPackageNamed("Example Package " + System.DateTime.Now)
                                                  .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]")
                                                          .WithFirstName("John")
                                                          .WithLastName("Smith"))
                                                  .WithDocument(DocumentBuilder.NewDocumentNamed("document 1")
                                                          .FromFile("P:\\Documents\\documents-example\\Test PDF.pdf")
                                                          .WithSignature(SignatureBuilder.SignatureFor("[email protected]")
                                                                  .OnPage(0)
                                                                  .AtPosition(100, 100)
                                                                  .WithSize(250, 75)
                                                                  .WithField(FieldBuilder.SignatureDate()
                                                                               .AtPosition(100,200)
                                                                               .OnPage(0)))
                                                          .WithSignature(SignatureBuilder.SignatureFor("[email protected]")
                                                                  .OnPage(0)
                                                                  .AtPosition(200, 100)
                                                                  .WithSize(250, 75)))
                                                  .Build();
           PackageId createPackageOneStep = eslClient.CreatePackageOneStep(pkg1);
Please advise. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: In a document with multiple signatures how to insert the date of the first sign

0 votes
The client meant the first signed signature and not the latter. Can you please share the code snippet for the first signed signature?

Reply to: In a document with multiple signatures how to insert the date of the first sign

0 votes
Hi Rajiv, As we all know that Signing Date binds to specific Signature Field and can't be determined by run time, so I am afraid OneSpan Sign haven't provide an out of the box solution to accommodate this use case. If client wants to work it around, they could consider having another dummy signer after the real signer, put a text field for this dummy signer and programmatically inject the first signing date. The backside of this workaround is, the actual signer can't immediately see their signing date after completion, and there're extra steps to do, like they need to setup a callback listener to trigger the signer completion event, and to set signing order for their transaction, etc. Please advise whether client wants to follow this path. Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: In a document with multiple signatures how to insert the date of the first sign

0 votes
Hello Duo, Here’s the objective from the client: The solution proposed by Ahmad (referred to below) involves creating a document with a label for each signer superimposed onto a given X, Y location on the document. The idea is that once the listener learns the document has been signed, if it’s the 1st signer, the value of any label NOT belonging to that signer can be assigned a value, in our case with the current date. With any subsequent signing, nothing will happen, and the rest of the labels would remain blank. I have set this up, and the unsigned document looks correct. When the listener code is run, however, in order to assign a date to the label I have to first change the package status back to DRAFT. Then presumably assign the date, which I haven’t managed to do successfully, then resend the package. Since this results in another signing notice being emailed, including right back the person who just signed, this is an unacceptable solution. What was not discussed when this solution was proposed was having to change the status back to DRAFT in order to manipulate the document. Here’s the code that puts the label on the page: Field execDateField = FieldBuilder.Label() .WithId("ExecDateField_" + iSignerNum.ToString()) //.WithValue(DateTime.Now.ToString("MMM dd, yyyy")) .AtPosition(iExecDateX, iExecDateY) .WithSize(iExecDateW, iExecDateH) .OnPage(iSignPageInitialID) .Build(); eslClient.ApprovalService.AddField(packageId, docID, signatureId, execDateField); And here’s the code that would fill in the date field (I tried a few different things. In any case, it’s unacceptable to re-send the package.): public ActionResult Listener(string packageId, string sessionUser, string createdDate) … for (int i = 0; i then 1, we know that 1 is viable, so we assign the date to that signature field (Id = "ExecDateField_1") // (all signature fields are superimposed onto the Execute Date line) // once the ExecuteDate is assigned, the package record's hasExecuteDate field is updated to true, and every subsequent signer will have no effect iSignerCount += 1; if (row["SignerName"].ToString() == sessionUser) { if (iSignerCount > 1) { iSignerNum = 1; sSignerName = sSigner1; } else { iSignerNum = 2; sSignerName = sSigner2; } break; } } // set the ExecuteDate field on the document EslClient eslClient = new EslClient(apiKey, apiUrl); PackageId pkgId = new PackageId(packageId); DocumentPackage createdPackage = eslClient.GetPackage(pkgId); eslClient.ChangePackageStatusToDraft(pkgId); //Field executeDateField = FieldBuilder.SignatureDate() // .OnPage(pageId) // .AtPosition(iExecDateX, iExecDateY) // .WithSize( 400, 50 ) // .Build(); // eslClient.ApprovalService().UpdateField(pkgId, docName, new SignatureId(sSignerName), executeDateField) Field executeDateField = FieldBuilder.Label() .OnPage(pageId) .WithId("ExecDateField_" + iSignerNum.ToString()) .WithValue(DateTime.Now.ToString("MMM dd, yyyy")) .AtPosition(iExecDateX, iExecDateY) .WithSize(iExecDateW, iExecDateH) .Build(); eslClient.ApprovalService.AddField(pkgId, docName, new SignatureId(sSignerName), executeDateField); //eslClient.ApprovalService.AddApproval(pkgId, docName, new SignatureId(sSignerName), executeDateField); //eslClient.ApprovalService.AddApproval(pkgId, docName,) eslClient.SendPackage(pkgId);

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off