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

Question

Question

Forms - Multiple Lookup Criteria, Not Autopopulating

asked on February 21, 2018

We have a form that has two drop downs that are populated based off a lookup. Another lookup is then performed using those two drop downs. Some people will have multiple choices in the second drop down, but many people will only have one, so when the form loads the two drop downs are already populated:

The problem with this is that the Account Number uses the Budget Year and Fund to populate the drop down so people can choose the right account - but when both Budget Year and Fund are the only choices and are already populated, it will not populate the Account Number. You have to actually select the blank in Fund, then select the fund again to get the Account Number to auto-populate. Our lookup rule looks like this:

So it appears it's still waiting for the user to make a choice before actually auto-populating. Is there a way to get around this without having to add a "Pending" and making everybody click to actually get this to lookup correctly? 

 

Thanks for any help!

0 0

Answer

SELECTED ANSWER
replied on February 27, 2018

I was able to reproduce the issue now. The cause was a known bug in 10.2.1/10.3.0 that, when change the field outside collection (field "Year" in your case), lookup would not be triggered.

This bug will be fixed in the coming Forms 10.3.1 release. Sorry for the inconvenience.

For now, you can try the following custom script as a workaround. The script would trigger change event on Account>Fund when Year field was changed. You need to set CSS class "year" on the Year field and "fund" on the Account>Fund field:

$(document).ready(function(){
  $('.year select').change(function(){
    $('.fund select').change();
  });
});

 

0 0

Replies

replied on February 21, 2018

Hi Phillip,

Which version of Forms did you use? I tried on Forms 10.2.1.246 and could not reproduce the issue: the lookup result is filled directly on form load.

0 0
replied on February 26, 2018

Hi Rui,

 

I'm also on 10.2.1.246.

 

This is what I get on load:

But after I deselect "0 - Finance and Administration" and reselect it, I get this:

 

Thanks for your help!

0 0
replied on February 26, 2018

This is what I used for testing:

On form load all values are populated:

What is your lookup rule to fill the Year and Fund fields?

0 0
replied on February 27, 2018

Hi Rui,

 

This is the year lookup:

And this is the stored procedure referenced:

 

This is the fund lookup:

And this is the stored procedure referenced there:

 

Thanks!

0 0
SELECTED ANSWER
replied on February 27, 2018

I was able to reproduce the issue now. The cause was a known bug in 10.2.1/10.3.0 that, when change the field outside collection (field "Year" in your case), lookup would not be triggered.

This bug will be fixed in the coming Forms 10.3.1 release. Sorry for the inconvenience.

For now, you can try the following custom script as a workaround. The script would trigger change event on Account>Fund when Year field was changed. You need to set CSS class "year" on the Year field and "fund" on the Account>Fund field:

$(document).ready(function(){
  $('.year select').change(function(){
    $('.fund select').change();
  });
});

 

0 0
replied on March 2, 2018

Thank you SO much, Rui!!

 

That works beautifully!

0 0
replied on April 3, 2018 Show version history

This issue that fill field outside table won't trigger lookup rule if match multiple rules and hide auto fill button has been fixed at Forms 10.3.1,and you can download newest package at https://support.laserfiche.com/news/3882/laserfiche-10-3-1-released.

0 0
replied on April 5, 2018

Thank you!

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

Sign in to reply to this post.