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

Question

Question

Problem Using Date Token Calculator

asked on January 9, 2015

We have a date that is being pulled from a database and brought into a Workflow. We then use that date in a Date Token Calculator activity:

After the workflow has run, I can see it is coming up with the incorrect date.

The original date in the database for one employee is 9/2/2014, but when I look at the Tokens tab when viewing the the tracked tokens of the workflow, it is showing the calculated date as being 8/4/2014. Any idea how to correct this?

0 0

Answer

SELECTED ANSWER
replied on January 9, 2015

I performed a generic test by taking a test document in my repository and assigning it two different date fields (original date and new date). I manually set the original date to be 9/2/2014 and left the new date blank. Then I created a test workflow that gets the original date value, then runs that token through the date token calculator to add 91 days to it and then I assigned the resulting token from the date token calculator activity into the new date field and it properly set it to be 12/2/2014.

With that being said, perhaps the issue may lie in your loop iteration and perhaps the date you're adding 91 days to isn't what you think it is. For debugging purposes, can you track the tokens in each loop iteration or perhaps record the original date value being processed along with the new calculated date and store those values in separate debug tokens and assign that someplace so you can confirm that the loop activity is being done on the proper values?

If everything looks correct and during each loop, the original date being calculated against is correct, but it's just not correctly adding 91 days to it, then please open a support case with your reseller and provide a copy of the workflow along with a sample subset of the database where you're getting the original date from. Feel free to trim things out so that nothing sensitive is passed along.

0 0
replied on January 9, 2015

I have added a Track Tokens activity to the workflow and put it at the top of the flow, but it is not displaying what I expected. I have opened a support case with our VAR.

0 0
replied on January 9, 2015

Sounds good. It doesn't seem that the issue is with the Date Token Calculator activity then, but rather with how you're trying to get the original date from the database to then be processed and have 91 days added to it. If your reseller needs assistance in figuring out what's going on, then we'll be glad to assist via the support case.

0 0
replied on January 9, 2015

We believe the issue has to do with extra spaces at the end of the date that is being brought in from the database. I will be looking at changing the database field type from nchar to nvarchar to correct the issue.

0 0
replied on January 10, 2015

If that doesn't work you might just try doing a pattern match on it and using that. 

 

I generally use \d\d?\/\d\d?\/\d\d\d?\d?

 

 

1 0
replied on October 22, 2019

Thank you Chris for putting your expression in your response!  I have been struggling with pulling a date from text using Workflow.

Thank you again!!!

Christine 

0 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.