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

Question

Question

Trigger Lookup On Drop Down Change

asked on August 4, 2016

I'm using Forms 10.1.  I have a form that has multiple lookup rules.  One of the lookup rules populates a drop down list.  When the selection in the drop down list changes I need another lookup rule to fire to populate an input field based on the value selected from the drop down list.  Do I need to use javascript to make this happen?  If so, can someone provide a snippet.  I've tried many variations of javascript to try and trigger the lookup and I can't seem to make it work. 

If it has any impact on the issue I'm using the same stored procedure to populate both the drop down and the field, but with separate lookup rules.

Thanks.

0 0

Replies

replied on August 4, 2016

No custom JavaScript is needed for the function to work. Here is the lookup rule settings I used (use one table and one stored procedure):

And you mentioned that you're using the same stored procedure to populate both the drop down and the target field. If the stored procedure has an input, how do you use it to populate the drop down field? Can you post your lookup rules here?

0 0
replied on August 5, 2016

The screen shot you posted is in essence the way I have it setup.  I just have a few more parameters.

The second rule basically uses the input from the first rule to lookup an additional piece of information for the same record.  This is necessary because Laserfiche Forms for some unknown reason refuses to support assigning values to choices for a drop down populated via a lookup.  I've posted about this previously here but haven't received any info or figured out a better work around.

0 0
replied on August 7, 2016

So you are using multiple match fields. Did you see the "Auto fill" button by one of the match field? Did the lookup rule work when you click the "Auto fill" button?

If you just need the custom script to auto trigger the "Auto fill" button, you can refer to http://answers.laserfiche.com/questions/48879/Auto-Fill-Button

 

0 0
replied on August 8, 2016

Thanks for the info Rui.  There are Autofill buttons but clicking has no effect.  I have triggered Autofill automatically in the past so I'm familiar with the code.  I can't get this working so I'll have to try another route.

0 0
replied on August 8, 2016

I built a similar form and the lookup rules worked for me (ID is the dropdown field, and value can be filled into the LastName field when click auto fill.)

Have you tried other tables/stored procedures with auto fill buttons on this form? Did that work?

If it worked, then the issue may be with your stored procedure. Can you try executing the stored procedure with the same input in sql management studio?

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

Sign in to reply to this post.