locked
Get Date Signed from Digital Signature RRS feed

  • Question

  • I am trying to get the Date Signed from the digital signature in infopath using a rule to set a field to this date that I can promote to the SharePoint List.
     
    xdXDocument:GetNamedNodeProperty(/my:myFields/my:signatures1/my:signatures5/*[local-name(.) = "Signature"], "SignedOn", "???")
     
    If I do this I can get the "SignedOn" node but that returns the following...
    "on Tuesday, November 08, 2011 3:04 PM (Central Standard Time)"
     
    Do you know a way to get just the date and set it to a Date Field?  I also saw UntrustedSystemDateTime in the xml but I could not retrieve it.
    Tuesday, November 8, 2011 9:09 PM

Answers

  • Hi dhaas,

    I have looked over this and tried several different methods to grabbing this data and pulling it out.

    The first and most obvious is just trying to use something like an expression box and path down to it but this won't work because that xpath doesn't exist until the form is signed.  The next was looking at a formula using substring, substring-before and substring-length to look for a character within the signed node of the main data source of the form.  It searches for the first instance of "Z" from the SharePoint date formatted data.  The problem with this method is that it has to be run as a default value on a field and will not work in a browser form.  The other problem is the fact that since you are doing this on a form that a user is signing, when they sign it that action essentially "locks" the form so if any changes are made then that will invalidate the signature.  Because of this when a user opens the form again after signing it the formula will attempt to recalculate that value and try to modify the form data essentially invalidating the digital signature that had been add previously.  The formula we were using was:

    substring(substring-before(signature group, "Z"), string-length(substring-before(signature group, "Z")) - 18, 19)

    My suggestion is to look at adding a date/time field to the form and having the user fill this field out prior to signing the form.

     


    Regards, Aaron Suoja - Microsoft Online Community Support
    Monday, November 21, 2011 4:51 PM

All replies

  • Hello dhaas,

    Thank you for your question.

    I am trying to involve someone familiar with this topic to further look at this issue.

    Thanks,
    Qiao

    Friday, November 11, 2011 12:20 PM
    Moderator
  • Hi dhaas,

    I have looked over this and tried several different methods to grabbing this data and pulling it out.

    The first and most obvious is just trying to use something like an expression box and path down to it but this won't work because that xpath doesn't exist until the form is signed.  The next was looking at a formula using substring, substring-before and substring-length to look for a character within the signed node of the main data source of the form.  It searches for the first instance of "Z" from the SharePoint date formatted data.  The problem with this method is that it has to be run as a default value on a field and will not work in a browser form.  The other problem is the fact that since you are doing this on a form that a user is signing, when they sign it that action essentially "locks" the form so if any changes are made then that will invalidate the signature.  Because of this when a user opens the form again after signing it the formula will attempt to recalculate that value and try to modify the form data essentially invalidating the digital signature that had been add previously.  The formula we were using was:

    substring(substring-before(signature group, "Z"), string-length(substring-before(signature group, "Z")) - 18, 19)

    My suggestion is to look at adding a date/time field to the form and having the user fill this field out prior to signing the form.

     


    Regards, Aaron Suoja - Microsoft Online Community Support
    Monday, November 21, 2011 4:51 PM