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

Question

Question

Workflow Compare Timestamp Incorrectly Shows False

asked on March 13, 2017

I have a workflow that is triggered by a Forms process.  In this workflow, it pulls in two DateTime values.  One of them comes from my form, the other comes from a database query.  There is a loop in my workflow that checks whether one DateTime value is greater than the other, and only exits the loop when it evaluates as False.

I'm still in testing with this form, so I don't have it running with multiple staff, but I do have it running with my own user and two test users.  For some reason, in one of these three instances, the DateTime comparison is correctly evaluating as True, but in the other two instances it and incorrectly evaluating as False.

I'm not certain what I've done incorrectly.  Any suggestions would be appreciated.

Here is the workflow condition that is evaluating as True:

Both of the two workflow conditions that are evaluating as False look like this:

The first values it is comparing (3/12/2017 4:08:10 PM and 3/13/2017 5:54:59 AM) are the values from my form, the second values (3/10/2017 12:42 PM and 3/7/2017 3:45 AM) are the ones coming from the database.

The only difference I'm seeing is that one has seconds and one does not, and that doesn't seem to explain the result I'm getting.  Both values were originally set via workflows using the %(DateTime) token.

0 0

Answer

SELECTED ANSWER
replied on March 13, 2017

I figured it out.  I noticed that the timestamp coming back from my Form was stored as a Single Line field (text) instead of as a date and time value.  So it was just saying that alphabetically 3/7... comes before 3/13... which is correct alphabetically.  So I just created new tokens to re-format both timestamp fields as yyyy/MM/dd HH:mm.  And compared them that way.  Now it's working as expected:

1 0

Replies

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

Sign in to reply to this post.