CervantesSec/cervantes

Add mapping for “Created Date” to Scriban variable {{DocumentCreated}}

Closed this issue · 6 comments

Can you please add a mapping for the report’s “Created Date” to the Sriban variable {{DocumentCreated}}?

image

Hi @jstangle yes sure no problem I will create a new image with the variable included

Regards

Already added in the new stable and dev image

Thank you
Best regards

Thank you very much! :-)

I didn't comment it but the variable is {{DocumentCreatedDate}} :)

@mesquidar thank you! I can confirm that variable is working. I also noticed that the array of Documents seems to be updated after a new report is generated, so the latest version of the document is not immediately reflected in the array.

I have created 3 reports, the latest has the version number 1.2
image

Sriban in the template:
{{ for doc in Documents }}Version: {{ doc.DocumentVersion }} Name: {{ doc.DocumentName }} Date: {{ doc.DocumentCreatedDate }} Changes: {{ doc.DocumentDescription }}{{ end }}

Output in the report 1.2:

Version: 1.1 Name: Tralala Date: 8/16/2024 Changes: Added links
Version: 1.0 Name: Tralala Date: 8/16/2024 Changes: Initial release

The array is missing the latest document.

Hi @jstangle this should be fixed in the new image :)

Regards