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

Question

Question

Forms process adding 6 hours to a date/time stamp

asked on February 22, 2016

I've got a simple business process for Forms 9.2 that I developed to recreate this issue which can be downloaded here: http://216.119.108.11/Upload/BPApprovalTest.xml

My client wants a form that goes through multiple approval levels.  At each level, the next person wants to be able to see the previous approver's username and date/time stamp (they aren't using digital signatures).  To handle this, I have a basic form with the data on it that needs approval.  Once filled out it goes to the first approver.  If approved, it goes to the second approver which gets the same form the first approver got with a text field named "Approval1" with the following variables in the default value of the field:

{/dataset/_submitter} {/dataset/_action} {/dataset/_submission_time} {/dataset/_comment}

This works great and the second approver sees the correct date/time submission for the first approver.

Once the second approver approves the form, it goes to a "Send to Laserfiche" process.  The "Send to Laserfiche" process uses a third form identical to the one submitted except that it has an "Approval2" text field with the same default value that the "Approval1" field uses.  It just grabs the information from the previous submission and puts it into the Approval2 field.

This is where it gets off the tracks.  The form sent to Laserfiche has exactly 6 hours added to the stamp in the "Approval1" field even though approver2 sees the correct time when submitting his form.  The "Approval2" field on the form sent to Laserfiche has the correct time stamp on it.

Am I doing something wrong?  Why would this happen?

0 0

Answer

SELECTED ANSWER
replied on March 2, 2016

In Forms 9, the process variables from user tasks prior to the previous one will always use UTC time. In order to store the correct time, you need to modify the timestamp to make it the correct time zone. One way I can think of is using JavaScript to add the appropriate number of hours to the timestamp, and then store that value in the field on the final form. Another potential workaround is passing the process variables to Workflow, changing the timestamp to the correct time zone in the workflow, and then filling a PDF with that corrected value and saving it to the repository.

0 0

Replies

replied on February 29, 2016

Hi Peter,

I'm getting in touch with the Forms team for this one; I had the same issue on my machine. I'll update the thread when I have more information for you.

0 0
replied on March 1, 2016 Show version history

The problem you're experiencing is a result of a time zone issue, which has been fixed in 10.0. However, the behavior of your Forms process will change in 10, namely because read-only forms are handled differently. We recommend using a different strategy to implement your process in 10 that involves taking advantage of the 2-way information exchange between Forms and Workflow. The root of the problem you ran into lay in Forms only storing the previous submission's details, and not those prior. Now you can retrieve those submission details in Workflow and store them as tokens to be used throughout the business process. This means that you'll run a workflow after each approval to capture the submission details, and then pass those into the subsequent form. The new business process looks like this:

And the workflows triggered look like: 

In this case, you would include the fields that I named "Approval1 Comment from WF" and "Approval1 Time from WF" in forms to display the comment and time of the first approval task.

After running an analogous workflow for the second approval, the final form with both sets of submission details could look like:

0 0
replied on March 2, 2016

Tanya,

Thanks for looking into this.  If I read this right, it only fixes things for version 10.  Is that correct?  Is there a workaround for version 9?  The end user is not ready to upgrade yet.

Peter

0 0
replied on March 3, 2016

Thanks Tanya, I was thinking about how to handle it with some sort of Javascript.  This gives me some good ideas.

Peter

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

Sign in to reply to this post.