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

Question

Question

"Current Date" Not Behaving as Expected

asked on May 28, 2020

I have a form that requires two different levels of signatures. At the bottom of the form, I have a signature field and a date field which is set to read only and a default value of "current_date". I thought this would populate the date field with the date that the user completed the form, but it's populating instead with the date that the task was initially assigned to that user. 

How do I go about creating a date field that populates the current day upon form submission? I'd prefer the individual not have to select the date manually. Sometimes there is a day or two between when the form is signed by both parties and I'd like to accurately track the date that the signature was obtained. Thanks!

0 0

Answer

SELECTED ANSWER
replied on May 28, 2020

Is the other date/signature field present on the initial form?

The current date should only populate with the date the form/task is submitted, which leads me to believe it is actually getting populated in the previous task.

When a date field is set to "current date" and read only, it should display "Date captured on form submission"

 

If you're using the same form for both tasks, it would explain why the date is being populated, and to get around that you'd either need two different versions of the form or find a way to prevent the first task from saving a value for that second signature date.

1 0
replied on May 28, 2020

Aha! I think that's what is causing it. This form has quite the workflow built around it with technically 7 different forms involved, all slight variations of the same form. I'll play with those date fields to ensure they're unique to that form and only appearing initially on the form the signatures are captured on. Thanks Jason!

0 0
replied on June 1, 2020

I must be doing something wrong. I've changed up the variables now so that on the first level of approval (the Director approval) for example, the variable is "Director_Date" and set to read only with the default value of "Current_date", which as you said, changes the field to read "Date captured on form submission", and on every other field on other forms in the process, the variable is "Director_Date_Read_Only" and is set to populate with the "Director_Date" value.

When I do that, instead of having the same date as the initial form submission appear for every field, now absolutely nothing appears for any of the approval date fields. 

I feel like this is such a simple thing to do but I'm clearly missing something... 

0 0
replied on June 1, 2020

I suppose it would help to understand a bit more about your process, so I have the following questions:

  1. How many different people/approvers need to sign?
  2. Do you have a separate signature/date field for each one?
  3. When you test, what does the instance show as the "Director_Date" variable value?
  4. Why do you need a separate "Director_Date_Read_Only" variable if it is meant to just be equal to the "Director_Date" field?

 

Based on your original post, it sounds like you should have two signature/date fields:

Approver 1 Signature/Date

Approver 2 Signature/Date

 

Then you would have at least two different versions of the form.

Form 1 (Initial Submission made by Approver 1)

Form 2 (Submission made by Approver 2)

 

Form 1 should have the signature/date for Approver 1, but not Approver 2, so it saves the values for Approver 1 but doesn't populate Approver 2's fields.

Form 2 should have the same signature/date fields Approver 1 populated (if you want them to be visible to the second approver), and it should have the signature/date fields for Approver 2.

 

0 0
replied on June 1, 2020

Hey Jason,

Here's the current workflow I'm working with: 

To answer your questions outright:

1. 2-3 approvers need to sign.

2. Each approver has a separate signature and date field.

3. The value for the Date_Director (sorry I misspoke earlier, this is the same as Director_Date that I have been referring to) variable is accurate: 

4. I don't. I just was trying that as a potential workaround to make this work properly, which clearly didn't work.

To give even more context:

There are typically only 2, but sometimes 3 approvals needed, and they occur in order: Director first, HR second, and on occasion, CMO third. I also have a separate form for each of these steps (Director Approval, HR Approval, and CMO Approval) so that each approver can see their respective signature/date fields, as well as those that came before (i.e. CMO can see the signature and the date the form was signed by both the Director and HR).

Your solution sounds like it might work, but not if I want the CMO approver to be able to see the date and signature of the Director and HR, like I previously mentioned. 

Thanks again for all your help Jason!

0 0
replied on June 1, 2020

I think things might be getting a bit confused. To clarify, there is nothing wrong with the variable from a previous step appearing on a subsequent form.

The problem occurs when you have the variable from a subsequent step appearing on, and therefore being populated on, a form from an earlier step.

For example each task would have a separate form with the following variables,

Director Approval Task

  1. Director Signature/Date variables only

 

HR Approval Task

  1. HR Approval signature/date variables
  2. Director Approval variables (hidden when not applicable)

 

CMO Approval Task

  1. CMO Approval Signature/Date variables
  2. HR Approval Signature/Date variables (hidden when not applicable)
  3. Director Approval variables (hidden when not applicable)

 

Because the additional signatures are not always used, you could set field rules to show/hide them based on conditions.

Either use the same values/logic you use in your gateways, or simply by only showing them if they are populated (Forms will throw up a warning for self-hiding fields, but it will work).

Set them to "ignore" the values when they are hidden and you don't need to worry about anything saving.

However, since you have multiple versions of the form you should also remove the "current_date" default on every form except the one where it should be populated.

0 0
replied on June 1, 2020

Jason,

I've tried setting it up to where the Date_Director field doesn't appear until the Director Approval step/form, and on that form it is set to read only and populates with the current date on form submission. On the following step (HR approval that uses a different form), I used the same Date_Director variable, made it read only, but removed the default value. When doing that, no date showed up at all from the previous Director step.

0 0
replied on June 1, 2020 Show version history

Are you absolutely sure they are both using the same variable (double check the variable name on the second form, not just the label)?

There has to be something else about your configuration that is causing the problem because if the variable is populated, and you're using the same variable on both forms, there's nothing in your process that should cause it to not be populated.

In the screenshot you sent earlier it definitely showed that a value was saved to the variable, so if that variable was placed on a subsequent form I don't see any obvious reason it wouldn't have the value from the previous step.

0 0
replied on June 1, 2020

I've gone through and completely removed the "Date_Director_Read_Only" variable from the form, so now only the "Date_Director" field remains, and only on the Director approval form is it set to populate with the current date. I've checked the variable on every single form and it is the same: "Date_Director". I'm just as confused as you are...

0 0
replied on June 1, 2020

I would suggest starting an instance that requires HR approval. First, go through all of your User Tasks and make sure they're set to use the correct form.

Once you've done that, submit a form to start a new instance.

Next, check the instance details to make sure the Director approval task is the only active Task after you submit the form.

After you verify that the Director approval task is the only one active, submit that form to populate the date variable.

Next, go back into the instance details, not the task, and check to verify that the variable has been saved/populated.

Once you verify that the HR task is active and the variable is populated, open the HR task to verify it is still not showing the value.

From there, you can try things like removing the variable from the HR form, reloading the page, then adding it back and reloading the task again.

If you keep the instance active it will allow you to test the changes and troubleshoot that specific task in real time instead of having to start multiple instances.

If it still doesn't show a value, try to send a screenshots of how the field is configured on the forms used in the Director and HR tasks.

0 0
replied on June 1, 2020

Okay thank you Jason! I've just been tasked with another project which puts this one on the back burner for now but I'll test as soon as I can and follow up. Thank you so much for all your assistance! 

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.