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

Question

Question

Form is not updating when fields change.

asked on February 20

Hello 

 

We are using a stored procedure on a form to fill in a field for the approver of a document. The approver is determined by the security level of the document. 

 

Everyone - Approver A

Management  - Approver B

Executive - Approver C

 

If we start a new form and select Everyone, the form fills in Approver A, however, if we go back and change it to Executive, in the same form before we submit it, the Approver field will be empty and Approver C will not fill.

 

Is there something we are missing from the lookup rules that would cause the form to not update?

0 0

Answer

SELECTED ANSWER
replied on February 24

Hi Peter,

 

I think i have found the solution. I was originally using a drop-down field that was being filled by the stored procedure. I switched this to a single line when I made a simple table and form as you has suggested.

 

In the simple form I also tried the drop-down field as well to see if it would fill and it was having the same problem as the main form, where it would not update if I changed the security level.

 

I went back to my main form and switch the Approver drop-down to a single line and now it works every time.

 

Would y'all know of any documentation from Laserfiche about trying to fill drop-down fields having different behavior from single line fields?

0 0

Replies

replied on February 20

This seems to work ok for me.  I built a table and a simple stored procedure to test with.

Each time I pick a different Security Level, it immediately updates the approver.  The big pitfall here would be if something wasn't spelled correctly.  I'd check to be sure "Executive" is spelled the same in the drop-down as it is in the table your stored procedure references.

I went ahead and tested Angela's suggestion and multiple results will return a blank value in the Approver field.  Here's my table:

This works fine for Everyone and Management but leaves a blank for Executive.

If it helps, here's the lookup rule I used:

1 0
replied on February 20

Peter, you are right that the form should work correctly if there are multiple options for the security level, however I'm not sure Jacob stated if the field was a drop down.  They could be using a drop down or radio button to select the security level but filling the value in a single line field. 

1 0
replied on February 21

Sure... there's lots of things we don't know and I'm probably speculating too much.  I tried out a radio button and a checkbox and found that neither can be used for a Lookup input - at least as far as I can tell.  I did find a workaround but I don't think the input really matters so long as:

1 - There is a single input value
2 - The input value matches a value in the table exactly
3 - The input value has only one match

If there are multiple matches, I found that Laserfiche does actually fill all the values so long as the Approver field is editable:

It just fills them as autocomplete options.

1 0
SELECTED ANSWER
replied on February 24

Hi Peter,

 

I think i have found the solution. I was originally using a drop-down field that was being filled by the stored procedure. I switched this to a single line when I made a simple table and form as you has suggested.

 

In the simple form I also tried the drop-down field as well to see if it would fill and it was having the same problem as the main form, where it would not update if I changed the security level.

 

I went back to my main form and switch the Approver drop-down to a single line and now it works every time.

 

Would y'all know of any documentation from Laserfiche about trying to fill drop-down fields having different behavior from single line fields?

0 0
replied on February 25

I can't seem to make it fail even filling the drop-down from a stored procedure.  Here's my sp:

Here's my lookup rule:

The dropdown gets populated by the sp:

When I pick Everyone or Management, the field fills automatically.  When I pick Executive, it gives me autocomplete choices since there are two different approvers at the executive security level:

Am I setting up something different than you are?

0 0
replied on February 20

When you execute your stored procedure in SQL using Executive as the parameter, does it return more than one result?  

0 0
replied on February 20

I'd recommend simplifying the problem first.  Build a test form that has only your dropdown to select the Security Level and the field to place the name of the approver.  Set your lookup rules and test.  This way, other lookup rules or field rules won't impact the results.

I'm curious about what happens when you pick the Executive level first.  Does that properly fill your approver?  If so, does the approver change to the correct value when you select Everyone?  Does the problem follow the Executive level or does it follow selecting one level and then changing to another?

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

Sign in to reply to this post.