I have looked and haven’t found anything, but is there any way to grab a document’s Creation or Modification date as it goes through a workflow? Not a date found in metadata but the systems creation date.
Thoughts?
I have looked and haven’t found anything, but is there any way to grab a document’s Creation or Modification date as it goes through a workflow? Not a date found in metadata but the systems creation date.
Thoughts?
As of Workflow 9.1, the creation and last modification dates, along with various other entry properties, are available as tokens in the Find Entry, Find Entries and Search Repository activities.
Hello,
As of Workflow 9.0, the only way to get creation/modification date for a document is to write a small script to do so. We are, however, looking into making that information more accessible in future versions of Workflow.
At the very least, someone should be able to use a document's creation date in workflow without resorting to VB script. "Looking into?" What year is this....1993?
As of Workflow 9.1, the creation and last modification dates, along with various other entry properties, are available as tokens in the Find Entry, Find Entries and Search Repository activities.
Here are all 3 lines to be wrapped in an «SDK Script» activity:
Dim docInfo as Laserfiche.RepositoryAccess.Documentinfo = wrapper.BoundEntry
Dim DateTime as DateTime = docInfo.CreationTime
SetTokenValue("Date Created", DateTime)
This returns the «Date created» value of a document into token %(Date Created)
For «Last modified» value, use «docInfo.LastModifiedTime» instead
Finally for folders, use «Laserfiche.RepositoryAccess.Folderinfo» instead
Hope that helps,
Lou
Lou,
I am attempting to set up the same script to pull the creation date for a document in workflow. When I save the script, I receive the error message: 'Laserfiche.RepositoryAcess.Documentinfo' is not defined.
Do I need to define this at the top of the script where the libraries are imported?
Thanks,
Zach
Zach,
RepositoryAccess is the default reference for scripts in WF9.1, you can add RepostioryAccess90 as a reference in WF 9.0 if you have it installed on the WF Server. Or you can use the following script that uses the default LFSO:
Dim doc as LFDocument = me.entry Dim Datetime as DateTime = doc.CreateDate SetTokenValue("Date Created", Datetime)
We are still running WF9.0 which would explain the issue. Thank you for your help Miruna!
as my coworker tony pointed out to me.... if you add the Find Entry activity, select "with ID," click the ">" button, select Global, then ID and choose Creation Date from the Additional Properties list, this gets you the token you need.
Is something like this available yet? Looking for how to use the entry's Creation date in WF.