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

Question

Question

"last week" search for workflow

asked on May 11, 2021

I've created a workflow that I want to run each weekend and act on the documents created over the past week. I'm using "search repository" to find the relevant documents, but whenever I configure the date it is always specific, never "in the last week". 

How do I set a revolving date? 

0 0

Replies

replied on May 11, 2021

There is no built-in search that will dynamically calculate what last week means when the search is run.

In Workflow, you can use Date Token Calculator to subtract 7 days from the current date and then use the resulting token in your search criteria. That way, whenever the workflow runs, you will get results within the past 7 days.

2 0
replied on May 11, 2021

Thanks a bunch! I've added the Date Token, but now I'm wondering how to add it to my search in the search repository, as in how is it formatted? I'm doing it based on a created date

0 0
replied on May 11, 2021

So you have the search criteria for your "this week" search, something like this:

{LF:Created>="5/9/2021"}

And you'd want to replace the date with the token value so every time the WF runs it figures out what "this week" means at that point in time and uses that.

 

 

1 0
replied on October 19, 2023

I found this today too! GREAT!

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

Sign in to reply to this post.