This topic contains 3 replies, has 2 voices, and was last updated by  Duo_Liang 3 weeks ago.

  • Author
    Posts
  • Participant
    Chris_Aub
    Newbie
    Member since: 10.05.2016
    Number of posts: 13

    Hi,

    This issue popped up in the last couple of weeks in our testing Sandbox environment. We’ve been using Text Anchors to configure all our signatures, so we have a FULLNAME block, and a corresponding Date signed that gets auto-populated on signature. In the past, the date format was always the GMT datetime format and that worked fine. Lately, it seems our date format is being forced to MMMM dd, yyyy .

    I tried overwriting the format, but nothing seems to work. Looking at the 11.25 release notes, I found this, but the opposite seems to be happening:

    PB-21327: Fixed an issue that prevented a document’s Accepted and Confirmed dates from displaying a timestamp.

    Here’s the code I use to set the field:

    public override ESignLiveAPIObjects.Field prepareEsignField(eSignLive_Conventions__c convention) {
    		                    
            ESignLiveAPIObjects.Field field = new ESignLiveAPIObjects.Field();
            field.subtype = convention.Signature_Sub_Type__c;
            field.type = convention.Signature_Type__c;
            field.extract = false;
            
            if(!String.isBlank(convention.Text_Binding__c)){
            	
            	field.binding = convention.Text_Binding__c;
            	field.value = 'yyyy-MM-dd';
                
            }
            
            field.extractAnchor = new ESignLiveAPIObjects.ExtractAnchor();
            field.extractAnchor.index = 0;
            field.extractAnchor.text = pdf.language == 'FR' ? convention.Text_FR__c : convention.Anchor_Text__c;
            field.extractAnchor.characterIndex = 0;
            field.extractAnchor.leftOffset = convention.Left__c.intValue();
            field.extractAnchor.topOffset = convention.Top__c.intValue();
            field.extractAnchor.width = convention.Anchor_Width__c.intValue();//Default 175;
            field.extractAnchor.height = convention.Anchor_Height__c.intValue();//Default 40;
            field.extractAnchor.anchorPoint = ESignLiveAPIObjects.AnchorPoint.TOPLEFT;
    
            return field;
            
        }
    
    

    Here is the resulting JSON for the package after creation:

     "fields": [
                            {
                                "binding": "{approval.signed}",
                                "validation": null,
                                "id": "",
                                "page": 9,
                                "data": null,
                                "top": 491,
                                "subtype": "LABEL",
                                "extractAnchor": null,
                                "formattedValue": "May 02, 2019",
                                "left": 566,
                                "width": 125,
                                "height": 35,
                                "extract": false,
                                "type": "INPUT",
                                "value": "MMMM dd, yyyy",
                                "name": ""
                            },
                            {
                                "binding": null,
                                "validation": null,
                                "id": "",
                                "page": 9,
                                "data": null,
                                "top": 485,
                                "subtype": "FULLNAME",
                                "extractAnchor": null,
                                "formattedValue": "",
                                "left": 206,
                                "width": 176,
                                "height": 40,
                                "extract": false,
                                "type": "SIGNATURE",
                                "value": "",
                                "name": ""
                            }
                        ]
    
    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 828
    Approved answer

    Score

    0

    Hi Chris_Aub,

    Date Field format was an account level setting so that it can’t be set by field level code. This issue could because of the version release so that the environment default date field format got changed, which is off the top of my head.
    To recover your previous setting, you could send your request to our support at support@onespan.com and our support team would help you!

    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    Participant
    Chris_Aub
    Newbie
    Member since: 10.05.2016
    Number of posts: 13

    Score

    0

    OneSpan support has updated the date format, and now it’s displaying as intended.

    Thank you

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 828

    Score

    0

    Glad that it solved your problem! Just let us know if you have any other issues. 🙂

    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist

You must be logged in to reply to this topic.