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

Question

Question

lookup rules not triggering reliably

asked on December 23, 2016

I have a form with 6 lookup rules.  

  1. The first rule validates an account number and pin, then fills in a field with the result.  This part always works.
  2. The remaining 5 rules do a lookup on that result field against 5 different tables.  The first 3 rules reliably return results.  The last 2 rules often don't until I go back to rule 1 and click autofill again, then everything usually behaves as designed.

Is there an issue with having too many lookups happening at the same time?  This happens in production Forms 10.0.0.1201 and my test server Forms 10.1.0.642.

Thanks!

 

0 0

Answer

SELECTED ANSWER
replied on December 28, 2016 Show version history

Thanks Jennifer.  

I also use javascript to click a hidden Autofill button.  But the last two lookup rules ALSO have hidden Autofill buttons because they differentiate results from the same table.  My Javascript would trigger those Autofill clicks before the lookup they depended on had finished.  That is why they would work the second time, but not the first.

The solution was to write a second javascript Autofill clicker that triggers the other two when the first lookup has changed the field the later lookups depend on.

  //when cursor leaves field63 click autofill button to fill field66 
  $( '#Field63' ).blur(function() {
    $( "#lookup112" ).trigger("click");
  });
  
  //click autofill buttons when field66 is filled
  $( '#Field66' ).change(function() {
    $( "#lookup116" ).trigger("click");
    $( "#lookup117" ).trigger("click");
  });

PS Feature request: make autofill an option, not a workaround.  The lookup should happen as soon as the required fields are filled according to their validation rules and no longer have focus.

0 0

Replies

replied on December 27, 2016

I am working in Forms 9.2 and have had to deal with this issue too.  I have found it is not a matter of how many rules there are, but a matter of how they are written, how many link back to the same field, and using a javascript to click the Autofill button.  Can you post a shot of what your rules and form look like?

 

1 0
SELECTED ANSWER
replied on December 28, 2016 Show version history

Thanks Jennifer.  

I also use javascript to click a hidden Autofill button.  But the last two lookup rules ALSO have hidden Autofill buttons because they differentiate results from the same table.  My Javascript would trigger those Autofill clicks before the lookup they depended on had finished.  That is why they would work the second time, but not the first.

The solution was to write a second javascript Autofill clicker that triggers the other two when the first lookup has changed the field the later lookups depend on.

  //when cursor leaves field63 click autofill button to fill field66 
  $( '#Field63' ).blur(function() {
    $( "#lookup112" ).trigger("click");
  });
  
  //click autofill buttons when field66 is filled
  $( '#Field66' ).change(function() {
    $( "#lookup116" ).trigger("click");
    $( "#lookup117" ).trigger("click");
  });

PS Feature request: make autofill an option, not a workaround.  The lookup should happen as soon as the required fields are filled according to their validation rules and no longer have focus.

0 0
replied on December 27, 2016

I know the last couple of updates for Forms 10.1 resolved a lot of lookup issues. You may look at upgrading.

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

Sign in to reply to this post.