Hello Fellow Nintexperts,
While working with a client today, I've come across an interesting issue. Despite developing a work-around already, I'd love to get some insight from the community to better understand my finding or to surface this bug. In order to confirm this issue wasn't unique to my client's environment, I recreated the issue in my development environment as well (see below).
I have two SharePoint Lists:
Both of these Lists have a date column called Some Date configured with the default settings (Date Only). I am then using a Site Workflow to fetch the Some Date value from a single item in the TEST A list, setting this value to a workflow variable (configured as a date), and am then creating a new item in the TEST B list based on this value.
What I'm finding is that when taking this route, the date stored in the second list loses a day (see screenshots below).
Query List > Set Variable > Create Item using variable
Any ideas on what would cause this behavior? I suspect it has to do with how time is being handled with converting from item value to variable and back to a list item value, but it threw me for a loop.
As silly as it sounds, I worked around the problem by adding a Calculate Date action before the Create Item action is called. It doesn't actually do anything. It simply adds zero time and stores the value back as the original variable:
After doing this, the correct date is shared to the new item. Any ideas?
Nintex Workflow for SP2013 (version 126.96.36.199).
Thanks for taking a look Cassy Freeman! It's one of those situations where I was able to work-around/resolve the bug a number of different ways, but I believe it's a bug nonetheless.
In fact, if I had designed this workflow myself, I doubt I would have taken the path that led to the strange behavior in the first place. I really just wanted to expose it in case it's something worth lobbing into the dev team's backlog.
oh ok hold on I just changed the workflow to:
is that the same as your scenario?
The date was the same. It didn't add a day. Let me know if I have got it wrong so that we can see if this is a bug.
Sure Cassy Freeman no problem! Here's my workflow if you'd like to download and take a look:
It's really just two actions – Query List and a Create item:
To keep the test-case simple, my Query List action is filtered by the first item in the TEST A list (i.e. ID = 1). Here's that action's configuration:
myDate is simply a Date and Time variable:
After I've pulled the date into this variable, I am simply creating an item in the TEST B list (see configuration below):
Not sure if this was addressed, but are you two running the same exact versions of workflow? (those pesky little version numbers...).
Could be a bug, or it could be that you are setting a default value somewhere and its just appearing as a bug - the date isn't updating from its original value. If you disable the workflow and create the item, what value is in the date for that item?