[NINTEX Workflow] Query List with filter on \creation\" not working (date format)"

  • 27 May 2016
  • 6 replies
  • 159 views

Badge +3

Hello

I am facing an illogical issue with a workflow that query a list of items into a collection variable with filtering on the item creation date. I can't find the correct date format!

So in my list I have items and the "creation" column (created by sharepoint, not me) contain automatically their creation date (ex: 4/14/2016 1:25 PM).

I have a workflow with action query list on this list with filter on the "Created" column is equal to 4/14/2016 1:25 PM.

I send myself an email with my collection variable to see the result (is there a better way to debugg??) and guess what: no result. I use the exact same format from my list and it does not work.

Any ideas?


6 replies

Badge +7

Hello Romain,

So when you querying the list with one particular time, and it is not giving any items details even though you have 1 item created by that time? Can you share the workflow diagrams with us? Or requirement details?

Badge +3

Hello Soni,

Yes, I created a simple example to test the query list action with a date.

So here my list:

27-05-2016 11-10-41.jpg

The workflow:

27-05-2016 11-11-34.jpg

The detail of the filter in the query list action:

27-05-2016 11-12-10.jpg

The date in the filter is the direct copy/paste from the created column.

Note that the workflow works fine if i configure it on other columns (like a column containing a string).

Also I am on a french computer, maybe there is a conflict between how the date is displayed in sharepoint and how nintex is awaiting it(?)

Badge +7

Hello Romain,

If you open an item in view page, you can see created data as 05/27/2016 3:20:52 PM. So it is holding the seconds information too.

If it holds seconds info and you are comparing till minutes data. This might be one of the reason behind this.

Create 2 workflow variables of type date and time - named Date1 & Date2, and set their dates including time. Here also we can set the time til minutes info.

Then on Query list filter action, user Created is greater than or equal to Date1 and less than or equal to Date2. So that u can get the items, which were created in between those time.

Thanks,

Soni

Userlevel 6
Badge +12

Hello Romain condat​ -

I would approach this just as Soni Reddy​ mentioned above; with 2 workflow variables and set as my min and max for my date range to look in.

I would try to take it one step further based on how you want to use the workflow. If you are looking for a specific date, then you can set it once and forget about it. But, if you want to look at a specific date that changes day to day (something like everything that was created yesterday), you will want to set those variable in the workflow prior to your query step.

So something like this:

185387_pastedImage_0.png

This will set the min and max dates to today, and then subtract 1 from the minDate variable (to be yesterday).

In your query action, just as Soni Reddy​ said:

185388_pastedImage_1.png

Hope this helps!

Badge +3

Hello Soni,

Your trick works perfectly, thanks for this idea!

I made another test though: create a variable and setting it up with the value "4/14/2016 1:25 PM". I then, in the query list action, compare "created" is equal to this variable and it is also providing the righ results!

So the conclusion would be, when working with date, to not compare then to values directly but to store these values into a date variable

Badge +3

Thanks for your contribution too. In my case I dont need a dynamic date, so my problem is solved.

Reply