06-11-2014 10:53 AM
For example; I need a placeholder to display a date 30 days from today. I'm using a user prompt for now, but it would be more efficient to have the system calculate it.
06-11-2014 01:19 PM
Hello Steve,
A VBScript on your Template that will execute at composition time can be used to programmatically modify this value. You can set specific Placeholder values via the TemplateAccess script field object and SetFieldData(templateName, placeholderName, newValue). More information on this can be found in the Module-Specific Scripting portion of the Hyland SDK.
Something along the lines of:
Dim dateVal
dateVal = TemplateAccess.GetField("my doc comp template", "my placeholder")
Call TemplateAccess.SetFieldData("my doc comp template", "my placeholder", DateAdd("d", 30, dateVal))
Thank you,
Jordan
01-26-2024 01:05 PM
I know this post was years ago, but I had the same question today, and this was my workaround (in case someone else ventures here)
We wanted a way to do a date calculation on a date Placeholder when Composing a document from a Document Composition Template without using workflow, form, or workview object.
In the Document Composition Template, we created a Database Query placeholder. The SQL query used the 'itemdata' table in the OnBase database (any database/table would work) ... we didn't need data from the query, we just needed the dateadd function in SQL.
The query we used was this:
Select Top 1 dateadd(month,-1,GETDATE()) 'itemdate' from [onbase].[hsi].[itemdata]
During Placeholder configuration, we selected "Insert the first result of a single Column" as the Output Style and used the column name 'itemdate'
I'm sure there are other ways, but this one worked for our needs.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.