You are viewing limited content. For full access, please sign in.

Question

Question

date token calculator not working as expected

asked on January 19, 2016

I need to find dates that are 15 days old and move them to a folder. I have set up a test workflow using the date token calculator. It returns 1 result, but I have another document in the same location with the same fields and dates. Why doesn't it move that document. I double checked the dates and fields and can not find anything different. Does it have something to do with the entry in the workflow?  Please see screen shots attached.  Thanks Wendi

Capture1.JPG
Capture2.JPG
Capture3.JPG
Capture4.JPG
Capture1.JPG (37.82 KB)
Capture2.JPG (69.12 KB)
Capture3.JPG (43.53 KB)
Capture4.JPG (53.74 KB)
0 0

Replies

replied on January 19, 2016

Hi Wendi,

Look at the properties of the "Search Repository" activity and confirm that under the "Results to Return" section, you have selected "All results"

Regards

0 0
replied on January 20, 2016

Hi Alex, yes search repository results to return All results is selected.  Thanks

0 0
replied on January 19, 2016

If I'm reading it right, you're searching for documents with the Invoice Test template where the Invoice field says "Approved" and that contain the date in their associated text pages. Is that actually what you intended to search for?

0 0
replied on January 20, 2016

Hi Miruna, yes all the invoices that are approved and the date field is older than 15 days need moved to another folder.

0 0
replied on January 20, 2016

Right, that's what I thought you're saying, but that's not what you're searching for. This is the search query you have:

{[Invoice Test]:[Invoice] = "Approved"} & %(DateTokenCalculator_DateTime_1)

The first part ({[Invoice Test]:[Invoice] = "Approved"}) is a template field search, but the second part is a text search, not a field search.

Instead, you should use

{[Invoice Test]:[Invoice] = "Approved"} & {[Invoice Test]:[DateFieldNameHere] <= "%(DateTokenCalculator_DateTime_1)"}

 

0 0
replied on January 20, 2016

Thank you very much Miruna, I will make the change and let you know.

0 0
replied on January 20, 2016

Hi Miruna, this is my search in the client and it pulls back to documents, it also works in Workflow and pulls the same result.

{[Invoice Test]:[Invoice]="Approved"} & {[Invoice Test]:[Date]>="01/04/2016", <="01/20/2016"}

However I want to use the date token calculator so I changed it in Workflow to:

{[Invoice Test]:[Invoice]="Approved"} & {[Invoice Test]:[Date]>="%(DateTokenCalculator_DateTime 1)"}

I believe I followed you instruction, but when I Test Search Query I get "Invalid date format. (9161)"    Any advise would be appreciated.  Thanks!

 

0 0
replied on January 20, 2016

Also I did copy exactly what you had except changed [DateFieldNameHere] to [Date] and to [%Date]. 

{[Invoice Test]:[Invoice] = "Approved"} & {[Invoice Test]:[Date] <= "%(DateTokenCalculator_DateTime 1)"}

get error Invalid date format (9161)

1 0
replied on January 20, 2016

That works for me. Add a Tack Tokens activity after you generate the date token so we can see exactly what the value looks like.

0 0
replied on January 20, 2016

Hi Miruna, I still get the error on Test Search Query in Workflow,  but I ran the workflow and it moves the documents.  Thanks!

0 0
replied on July 13, 2018

This is still happening.  I get the error when testing the Search activity using the date token, but the date token still works as expected when I run the workflow.  I was glad to find this post and Wendi's last comment, which made me try the workflow anyways, even though I was getting the error.

0 0
replied on July 13, 2018

I'd probably try looking at audit trail to see exactly what the search that made it to the Laserfiche Server was.

It looks like you're licensing for Advanced Audit Trail, so the failed search should be available in the audit report.

Or if it's easier, have your reseller open a case with Tech Support so we can take a closer look.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.