cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Filter Workflow on Date

Jump to solution


Hi.  Forgive my newbie status.   I am trying to filter a Query List to take a collection based on date.  I have a column "Action Date" and I am trying to filter the collection where Column Action Date is Greater Than or Equal To "Current Date".  If I remove this filter from the "Query List" it will pull all "ActionIDs" into the collection.  If I add the date filter it produces nothing.  Could anyone help with why?

Labels: (2)
0 Kudos
Reply
6 Replies
shirin
Nintex Newbie

Re: Filter Workflow on Date

Jump to solution

Hi Benjamin,

 

Is it possible if you can print out the both values and see what's the difference between the dates. You can use 2 "Log to  history list" actions, and print both values and see what's the actual values you are comparing. I am sure you have done all checking but just confirming that "Action Date" is DateTime field.

 

Let me know how you go.

 

Regards,

Shirin

0 Kudos
Reply
Not applicable

Re: Filter Workflow on Date

Jump to solution

Hi.  Here are some images that show that ActionDate is "Date Time Field in list" and shows the print out from ActionDate and from Current Date.commentsLogHistory.jpg

ListActionDate.jpg

QueryListforCollection.jpg

It is completley possible that I don't understand how it works.  but what I am trying to achieve is that it queries items in the list where ActionID is greater than Today (Current Date) and puts those items in the Var_ActionIDCollection.  Can't figure out what I am missing.

0 Kudos
Reply
Not applicable

Re: Filter Workflow on Date

Jump to solution

well.....its working.  I don't know why, but I created a simple For Each after and it is only updating the dates that are above the current date

0 Kudos
Reply
Not applicable

Re: Filter Workflow on Date

Jump to solution

Giving you the points because that is a handy tool to print the Log values.

0 Kudos
Reply
esthomason
Nintex Newbie

Re: Filter Workflow on Date

Jump to solution

After running into this same problem we made an edit to the CAML code to resolve this:

Using "Current Date" in your filter yields the following:

      <Lt>

        <FieldRef Name="Expected_x0020_Completion"  />

        <Value Type="DateTime">{Common:CurrentDate}</Value>

      </Lt>

If you go into the CAML editor you can made the following change and should find the filter will work (it does for me):

      <Lt>

        <FieldRef Name="Expected_x0020_Completion"  />

        <Value Type="DateTime"><Today/></Value>

      </Lt>

When doing this you'll need to be mindful of the warning notice Nintex pops up. Going back to the query editor does cause this edit to be lost, resulting in a blank field and thus unintended results.

0 Kudos
Reply
esthomason
Nintex Newbie

Re: Filter Workflow on Date

Jump to solution

In follow-on discussion with Nintex Support, the bug exists only when trying to use the "Execute" function within the Query List action.  Most people would want to test their query without having to publish their workflow and so the workaround above does the trick. Using CurrentDate will return the results you'd expect when you publish the workflow.

0 Kudos
Reply