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

Question

Question

Forms Look up value disappearing

asked on December 5, 2014 Show version history

I have a look up running for a forms submission.  When I start the forms process and enter the information for the look up, a value is found in the look up and inserted into the appropriate field.  However, the value only displays for a second, then it clears out.  If I reload the form and enter the look up information, it will find the value again but only display it for a second.  What should I look at to change this behavior?

Thanks,

0 0

Answer

SELECTED ANSWER
replied on December 19, 2014 Show version history

I found that I had the "lookupCondition" class associated with the field that I wanted filled by the look up as well as the other fields involved.  I removed the class from the field to be filled and this has taken care of the issue.

Thanks,

0 0

Replies

replied on December 5, 2014

Do you have any lookup rules that run on the fields in question that perform a "fill" operation?

0 0
replied on December 5, 2014

I was going to ask the same.

 

if you have a lookup the fills a field that does another lookup, and the second lookup fills the field for the first lookup, then this is the behavior you may see when the second lookup doesnt have the proper information returned for the first lookups field. I have fixed this myself by making a hidden field the filled field and moving it into place programmatically so it doesnt trigger a lookup loop.

0 0
replied on December 5, 2014

Hi Kenneth,

What do you mean by "moving it into place programmatically"?

0 0
replied on December 5, 2014

Hi Blake,

I don't have a fill operation running on this field but it is used to perform a calculation to fill another field.   In the code below, it is field #q20.

 

$(document).ready(function () { 
  $('#q20 input, #q10 input').blur(function () {
    $('#q11 input').val($('#q20 input').val() - $('#q10 input').val());
  });
});

 

0 0
replied on December 5, 2014

It seems that this is the code causing issues but I'm not sure how to change it:

$(document).ready(function () {
  
   function autofill() {
    $('.autofill').trigger('click');
  } 
  
  $('.lookupCondition').change(autofill);
});

If I remove this code, it works fine but the user has to push the autofill button.  I added this to remove the need to click the autofill buttons but it only works sometimes, other times it shows the value for only a second.  Any ideas how I can change this without the end user having to push the autofill button?

 

0 0
replied on December 7, 2014

So you have added "lookupCondition" this css class to all the condition fields used in a single lookup rule?  Can you share what the lookup rule looks like? I used two fields as condition for lookup with "lookupCondition" css and used same code as yours and can't reproduce the disappear issue.

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

Sign in to reply to this post.