Adding multiple role for Text Extraction Tag but getting error
Thursday, May 20, 2021 at 05:06amHey Team,
I am working with Text Tag Extraction and going through the blog i.e. https://community.onespan.com/documentation/onespan-sign/guides/feature-guides/developer/text-tag-extraction#tab-header-4
But while doing same with multiple signer role I am getting below error:
OneSpanRESTAPIHelper.OneSpanRestAPIHelperException: Error creating OneSpan package with documents: 400 - Bad Request - {"messageKey":"error.validation.createProcess.missingData","message":"Missing process definition.","code":400,"name":"Validation Error"}
I have also attached the example code which I have used and also with document I have created for your reference.
Can you please let me know it is possible or not.
Regards,
Shashank Verma
Reply to: Adding multiple role for Text Extraction Tag but getting error
Thursday, May 20, 2021 at 09:16amHi Shashank Verma,
The direct cause of this 400 error is at the PDF- typically when you open a PDF in notepad, it has an extra line break at the end, however it's not case in this sample PDF. If you manually add it, it should work as expected.
On top of that, not sure why but in my APEX SDK modelling, there's no this field any more:
data_x.esl_doc_extract_type = '1';
Let me know if adding an extra line break solves the issue and I will keep looking into this.
Duo
Reply to: Hi Shashank Verma, The…
Thursday, May 20, 2021 at 10:26amHi Liang,
We have updated the pdf and now I am getting the signer2 signature block. But, now we are have created the field from the code itself and then try to show on the pdf.
But we are getting the error. For your reference I have attached the screenshot of the error and also attaching the example code as well as pdf file.
Can you please check the pdf file for which I have updated the First Name syntax. Can you please let us know which syntax we need to refer on the pdf to show field box?
Regards,
Shashank Verma
Reply to: Hi Liang, We have…
Thursday, May 20, 2021 at 11:04amHi Shashank Verma,
From the APEX code, you are using the feature called Position Extraction, which matches the PDF form field name to the OneSpan Sign field name.
Duo
Reply to: Hi Shashank Verma, From…
Thursday, May 20, 2021 at 12:51pmHi Duo,
I went through the blog but the pdf i.e. used there is not available. So, can you please let me know how to use the tag on the pdf if we use the below code:
OneSpanAPIObjects.Field fieldClient3 = new OneSpanAPIObjects.Field();
fieldClient3.extract = true;
fieldClient3.name = 'first_name'; //match pdf field property name
fieldClient3.type = 'INPUT';
fieldClient3.subtype = 'TEXTFIELD';
Or do I have to put the 'first_name' in the pdf where I want the field box?
Regards,
Shashank Verma
Reply to: Hi Duo, I went through…
Thursday, May 20, 2021 at 12:57pmHere you are. Simply name the PDF form as "first_name".
Duo
Reply to: Here you are. Simply name…
Thursday, May 20, 2021 at 01:24pmHi Duo,
Thank you for quick response!!!
What about text tags, we use earlier as {esl:signer1:textfield:size(200,50)}}. So, how we gonna set the name of this field so if we get the values back in salesforce then it is easy to extracting and also if we want to set some value in that text tag from apex, can it be possible?
Regards,
Shashank Verma
Reply to: Hi Duo, Thank you for…
Thursday, May 20, 2021 at 01:27pmAs per the text tags syntax:
{{Xesl[_fieldName]:roleName:fieldType[:parameter1,parameter2,...]}}
You could define field name like this:
{esl_yourfieldname:signer1:textfield:size(200,50)}}
Duo
Reply to: As per the text tags syntax:…
Thursday, May 20, 2021 at 01:35pmSo, how about the value setting from the apex. As you know on the text tag we just do the below code
OneSpanAPIObjects.Document document1 = new OneSpanAPIObjects.Document();
document1.name = document1Name;
document1.id = document1Name;
document1.extract = true;
pkg.documents = new List<OneSpanAPIObjects.Document>{document1};
On the apex side we haven't created any field and but the textfield box will be shown on the pdf using text tag.
Regards,
Shashank Verma
Reply to: So, how about the value…
Thursday, May 20, 2021 at 01:42pmText tags extraction is a mechanism with which you don't need to explicitly create the field with code. That's to say, you won't mix the usage of text tags and other signature placement features. If you need to specify a default value reading from Salesforce, you may want to use Position Extraction or Text Anchor features instead.
Duo
Reply to: Adding multiple role for Text Extraction Tag but getting error
Thursday, May 20, 2021 at 01:49pmThank You Duo for the response!
Also, in the text anchor can we use validation mechanism. So, if we want to make textfield mandatory that can be possible.
Please also confirm the parameters which we are passing while creating text anchor field.
Regards,
Shashank Verma
Reply to: Thank Duo for the response! …
Thursday, May 20, 2021 at 02:00pmYes, both text anchor and position extraction can be applied Field Validator.
Duo
Reply to: Yes, both text anchor and…
Friday, May 21, 2021 at 01:29pmThank you Duo for the solution.
Reply to: Yes, both text anchor and…
Thursday, May 27, 2021 at 05:48amHey Duo,
Can you let me know if we can change signature type in Text Tags Extraction.
For now, we are using below tag to show the signature box but it is as Capture type
{{esl:signer1:capture:size(200,50)}}
Do we have other type of signature field in Text Tags ex: FULLNAME
Can you please confirm and let us know if we can implement that.
Regards,
Shashank Verma
Reply to: Hey Duo, Can you let me…
Friday, May 28, 2021 at 07:57amHi Shashank,
With Text Tags, the signature type is determined by its syntax:
{{esl:signer1:signature:size(200,50)}}
{{esl:signer1:initials:size(200,50)}}
{{esl:signer1:capture:size(200,50)}}
{{esl:signer1:mobile_Capture:size(200,50)}}
Duo