cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to create a calculated date placeholder (today + 30 days) without workflow?

Steve_Zirkle
Champ on-the-rise
Champ on-the-rise

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.

2 REPLIES 2

Jordan_Polaniec
Champ in-the-making
Champ in-the-making

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

Jay_Hatch
Confirmed Champ
Confirmed Champ

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.