HR Document Template|Scripting and Capturing Signature Date

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2019 11:46 PM
We are using Servicenow Document Template module to generate the PDF Documents.
Current Challenges:
1. We are using record producers and variables and our requirement is to pull the record producer variable answers to the document template. We are unsure about which script to use there? We can use [+]fields to get the HR profile level and case-level information.
2. Signature Date is missing [Implementing 2 signature functionality, we are unable to get the signature date].
Any help/advice on what scripting works in HR Document Template would be really appreciated.
Sample HR Doc Template in Servicenow
- Labels:
-
HR Service Delivery
- 2,650 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2020 08:26 AM
Hi
We are facing the same problem: How to get the signature date on an HTML template if there are multiple signatures.
Also - related - it would be great if scripts could be used to customize the content, similar to email-scripts in ITSM. That would make life soooooooo much easier 😉

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2020 09:04 AM
Hi Neha,
Are you previewing the document after the signed date is set? This may be the reason why the dates seem to be missing. There is a quick workaround for this. A Problem has been reported where Signed dates are NULL when viewing the document using the "Preview Document" button.
Secondly, when using the PDF Template mappings you can use these variables on the Advanced mapping of the PDF template. You seem to be using the standard HR Document Template. A PDF Template version of your Document Template would give you the ability to map the variables into fields.
Regards,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2023 07:46 AM
Hello @michaelj_sherid
You mentioned this is a known issue, but the post is quite old. Is this still an issue?
Follow up question: I have a document template (not HR PDF) that I have a document script to pull current system date, not signing date. This is always coming up null. Do you think this is related to "preview document" error, or a script issue?
(function runTemplateScript(target /*GlideRecord for target task*/ ) {
var cd = new GlideDate();
cd.setDisplayValue(gs.nowDateTime());
template.print(cd.getByFormat("MMMM D, YYYY"));
})(target);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2023 06:49 PM
Hi @ErinF Yes, this was rectified some time ago. This was specific to a use case where the document was signed (and signed date populated), then previewed again. I believe it was a patch in New York that addressed the issue. If you are seeing the signed date NULL after it was populated and previewed again, I recommend to submit a support issue since this was addressed back in the New York release.
Regards,
Mike