Posted Sat, 14 Jan 2023 10:40:31 GMT by Ameen Nihad Business Manager

I need to create records in one file cabinet for a set of record from another cabinet, this must be done automatically once a year. The new records include a text field called year, I set a filter in the Trigger tab of Autoindex as in the screenshot, it's works perfectly. Now I want to make the year value dynamic based on the current date at the time of execution, is it possible to do that?
I tried this in (Where Clause): Year(GETDATE()) and Year(Now) but both failed!

Is there another way to achieve that?
 

Update: I also tried the following but without success, I don't think WHERE CLAUSE accept SQL expressions!

DATEPART(yyyy, GETDATE())

CAST(DATEPART(yyyy, GETDATE()) AS CHAR(4))

Posted Mon, 16 Jan 2023 08:49:15 GMT by Gerardo Lisanti Team Leader Product Management
Hi Ameen,

as this requires a CAST or CONVERT operation on the database, you need to provide the SQL Statement (see screenshot attached)
e.g. for MSSQL: [YEAR]=CAST(YEAR(GETDATE()) as CHAR(4))

To do this, you must first activate the "Allow database access via SQL statement" option in DocuWare Administration > DocuWare System > General. Then you can specify a SQL WHERE clause.

However, this is only possible for DocuWare On-Premises.
For DocuWare Cloud, as far as I know, there is currently no solution to make this dynamic.

Viele Grüße / With best regards,

--

Gerardo Lisanti
Product Manager  |  DocuWare GmbH

You must be signed in to post in this forum.