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

Question

Question

Form fields not updating with new data populated from a lookup to a SQL table

asked on April 27, 2015

Our process is one by which a project manager submits a procurement request. This involves 3 forms:

  • a 'main' form that collects overall data about a project
  • a second form that is used when a particular set of conditions is triggered regarding what is to be bought
  • a third form that is a Manager Approval form for another set of conditions triggered from the second form

 

The issue is with the second form. This form displays consultant information (name, address, phone, etc.) for a procurement request and is triggered when the initiator selects architectural services with a budget value of less than a particular amount from the main request form.

In the process modeler, I used a sub-process (Pre-Qualified List Selection, image below) to handle the review and approval of the consultant (and my apologies for the loopiness of the model - I've been moving tasks around just trying to troubleshoot where the error may be coming from):

In green is the first time we go into this sub-process. "Select next available consultant" is the workflow that:

  • searches the consultant list in Laserfiche and selects the appropriate consultant
  • saves this information to a table in SQL

 

The form itself is configured with a lookup for this table (when the unique ID for the form instance matches that in the table) and pulls into the form the consultant information fields that have been saved to the SQL table (i.e. name, address, etc.). The user task "Accept/Reject" Consultant" notifies the initiator that a consultant selection is ready for his/her review. Their options are to approve/reject the selection.

This process works great the first time around. Let's say that the workflow pulls up AAA Consultant plus related information. If the project manager rejects this selection (and it is not a rejection that involves the "Manager Approval required" path - right now I'm just focusing on the "Rejection reason = valid" path), "Select consultant" gets the next available consultant from the Laserfiche document (e.g. BBB Consultant et al), this information is written to the SQL table (with the previous information deleted so that for any specific process instance there is only ever one row in the table that holds the current consultant selection), their position in the list is amended with "Reset previous..." service task, and we're back to "Accept/Reject" for the initiator.

When the project manager opens up the task, the form should be populated with the information for BBB Consultant but it still shows AAA Consultant. Interestingly enough, when the selection document gets saved to Laserfiche (after the PM approves the selection), it does show the correct consultant - in this case, I'd have two saved documents, one for AAA and one for BBB. 

I tried "Wait until workflow finishes before proceeding" options on the various service tasks (thinking the process was jumping ahead before the information was hitting the SQL table) but that didn't work. Should I somehow try to clear the form field values before repopulating them? I have a sneaking suspicion that the answer is some little thing we're doing (or not doing) as we're still getting used to Forms 9.2 but I can't seem to track down what it is.

Any help would be appreciated...as would chocolate. Lots of it. Will pay for shipping.

0 0

Replies

replied on April 29, 2015 Show version history

Hi Donna,

1. After you rejected the user task for the first time, there is submitted value for this consultant field. And the current behavior for lookup is that, if there is saved value from previous submission, the value would be kept.

If you are using drop-down for this field, you can see both AAA and BBB are available as options, while AAA is still selected. You can manually, or use JavaScript to correct this value.

2. As for the issue that it's BBB in saved document, it sounds like a bug because AAA is still expected in this case. However, I cannot reproduce this issue in my environment.

So can you provide more information on this? Are you using Forms 9.2.0 or 9.2.1? I noticed that you said there were two saved documents, but according to the process there should only be one saved document in "Save Consultant Selection". Where was the other from?

0 0
replied on April 29, 2015

Hi, Rui: thank you for your reply! Our forms version is 9.2.1. 

 

I figured the look-up behaviour had to be such that it doesn't refresh the values (maddening!) so it's nice to have that confirmed. The form fields are single lines (not drop-downs) so the JavaScript option sounds like the best option to address this. We're not Java-savvy here but at least I have a place to start to research and/or ask questions.

 

I did further testing these past few days and it seems that my third form is producing the correct name information when it's supposed to. So the first time through the process, the consultant selection form that is displayed to the project manager shows the correct first name, e.g. AAA Consultant. If that selection is rejected whereby the Manager must review/approve, that third form (the Manager's Approval form) will also show AAA Consultant. If we go through this a second time and get BBB Consultant, the project manager's form will still show AAA but if it's rejected again and the Manager must review/approve, their form will show BBB Consultant. 

 

I wondered if this was because this third form was created by dragging the few appropriate variables from the second form. Its values aren't being populated from a look-up. But the consultant selection form was basically set up on its own, if you will. Its values come from the look-up.

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

Sign in to reply to this post.