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

Question

Question

Javascript or jQuery code to reset a form field(s) (SQL query via lookup)

asked on May 7, 2015

Following a reply to this post of mine, I cannot get the code to work that re-sets form fields. I've tried resetForm(), location.reload(), document.reload(), form.reset(), etc. I'm a Java/jQuery newbie so it may be that I'm just not coding or entering it properly into the Javascript window. 

Any assistance would be appreciated. 

 

 

To recap, this is my current model for a sub-process that selects consultant names from a Laserfiche entry:

 

 

"Select next available consultant" triggers a workflow that searches through the entry, finds the correct name, and writes that name to a SQL table:

 

The consultant selection form used for the "Review consultant selection" user takes has a lookup that retrieves this information from the table and populates the fields:

 

The form itself uses single line fields:

Referencing the green text from the process model, the first time the select consultant process is triggered, the workflow and form show selection AAA; AAA is saved to laserfiche, and if the the Manager Review subprocess is triggered, that form will show AAA. 

 

However, if the PM rejects AAA with a valid reason, the same selection workflow is triggered again and chooses BBB. But when the user task emails a notification for the PM to review this second selection, the form is still displaying AAA; however, BBB will be saved to Laserfiche, and if the Manager Review subprocess is invoked again, that form shows BBB. 

 

And around we go: the form attached to the notification to the PM of subsequent consultant selections is always one behind the current selection. 

0 0

Replies

replied on May 8, 2015

To reset a form, see this post.

0 0
replied on May 8, 2015

Thanks, Blake. I had worked through those codes and none of them worked, alas.

0 0
replied on May 13, 2015

If these are different forms you have set up in your process that would be your issue. When it comes to the assigning a user a task the form you select is static, however the variables are dynamic. So if all the forms share the same variables it would be possible this way, if they don't share variables you would have to make a condition that would split into branches for each form based on the form you want.

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

Sign in to reply to this post.