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

Question

Question

Create date tokens for 1st day of month and last day of month

asked on February 26, 2015

Hello,

We have a new business process that needs to be able to insert date tokens in a Laserfiche Search for the first day of the preceding month and another for the last day of the preceding month. The date the process runs will determine what the date range is.

 

Example: The process is scheduled to run on the 15th of each month so for this example lets use February 15th, 2015 as the scheduled date the process will run.

I then need to calculate the date tokens for the first day and last day of the month prior to the date the process is scheduled to run. So the dates I would need to be calculated are: Jan 1st, 2015 and Jan 31st 2015.

Those dates will be used as tokens in the Laserfiche Search in order to find the correct entries that the rest of the business process will use.

Since the days of the month vary from month-to-month, is there a way to do this in Workflow without using some custom script?

0 0

Answer

SELECTED ANSWER
replied on February 26, 2015

Hi Eric,

Please refer to this previous thread which explains the concept of how this can be done using the date token calculator.

First Day of Previous Month:

Last Day of Previous Month:

4 0

Replies

replied on February 26, 2015

Thank you Alexander. However, this ins't working for me for some reason. I believe I have the token created exactly how it is shown in your screenshot but when I test the token, it does not alter the date that I enter for the test. Ex: If I test the token and enter 02/15/2015, the result is the same date as what I started with.

Here is a screenshot from my token configuration:

 

And a screenshot of the test whenever I test it from the search where I have the tokens embedded:

 

Any observations you have would be helpful.

 

Thanks!

Eric

1 0
replied on February 26, 2015 Show version history

The testing area in the token dialog only applies to any functions, indexes, formatting or regular expressions you had applied to that token. Instead, use a "Track Tokens" activity and perform a generic test of the workflow by running it directly in the designer. My test workflow just has the date token calculator activity and track tokens. When I run the workflow in the designer, this is the result:

0 0
replied on February 26, 2015 Show version history

Ahhh.... ok, that worked better. The full business process I have will be emailing to all the the returned search results and since that would be over 100, I didn't want to run the actual process. I copied the Date Token Calculator and the Search activities to a new workflow and then ran it separately. My results matched what I was able to search for in the Laserfiche Client so it is working perfectly!!

 

Thanks Alexander!

0 0
replied on April 3, 2018

This worked awesome for me.  Thanks for the screen shots and tips!!  LF Rules!

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

Sign in to reply to this post.