There isn't an in-built field that pulls in the date of document assembly, but there are a couple of ways to get to this outcome without too much hassle.
Template field for pdf assembly
The method will only work if you are exclusively using the assembled pdf. If that's the case for your workflow, simply use the native Date field in MS Word. Just add a field, right-click and select edit field, then scroll down the list of field types and select date and then choose the desired format. As the pdf gets 'set' on assembly, the date field will not change on repeated viewings of the document.
Field with logic for Word assembly
The above method will update the date field whenever the document is opened in MS Word, so if you need the Word version of the document to be assembled, you will need to create a field on the form with a small piece of logic using the following steps:
- Add a text box to your form and make sure the hidden property is selected.
- Go to the logic tab of the text box and click the '+Add Logic' button
- Give the piece of logic a name and set the container trigger type to 'javascript'
- In the trigger's javascript box write:
result = true;
- Click '+Add Action', name it and set the action type to 'value'
- In the action's javascript box write:
value = moment().format('DD MMMM YYYY');
- This will return a date of 09 September 2019 (for example) but you can change the format to whatever you like
- Make sure to save the action, the logic and the field
- You then just need to link the field to your form as you would normally
This will update every time the form is submitted, so reusing a record will not keep the original submission date. If you want to keep the first submission date you could use the following trigger at step four, where data.DateSubmitted is the name of the text field you are adding the logic to:
result = (data.DateSubmitted === undefined || data.DateSubmitted === '') ? true : false;
Comments
0 comments
Article is closed for comments.