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

Question

Question

Forms 11 lookup runs on empty fields

asked on May 16, 2022 Show version history

We recently upgraded to Forms 11 (11.0.2201.20436).  While investigating a customer complaint, I discovered that Forms 11 seems to be FAR too enthusiastic about trying to run lookups.  In this particular Form, I have a lookup that runs based on the values of the three indicated fields:

 

As soon as I select an inmate to fill the first field, the lookup runs.  Rather than getting a result based on a particular date and time, the hyperactive and eager-to-please lookup just returns values based on ANY date and time.  This is not good!  I can think of two ways to bypass this effect:

  1. Add an 'autofill' button, hide it via CSS or JS, then use JS to click the button when a time and date have actually been entered
  2. Switch from a standard lookup to a stored procedure.

 

While I'm confident those options would work, they shouldn't have to!  I shouldn't have to replace every lookup with a stored procedure, or figure out for each Form how to use JS to click a specific autofill button at the appropriate time. 

I'm really afraid of what these incomplete lookups might be doing with our many active Forms processes; how many processes are messed up or inaccurate that just haven't come to light yet? 

Has anyone else seen this issue?  Any other ideas on how I might resolve this?

 

One other little nugget / question - this Form has a total of four lookups based on the 'visit time' field.  I put in an event listener to show me when a lookup event has been run with that particular field as the triggerId.  I found out that every time ANY lookup occurs (at starting time, or any time any field associated with a lookup is changed), the visit time event listener triggers two-four times.  Is that normal?  Doesn't seem like it should be....

1 0

Answer

SELECTED ANSWER
replied on July 20, 2022

@████████ I never did find the time to really dig in and find the exact recipe for recreating the problem, but I was able to get a solution. 

In my experience the problem seems to arise when you have multiple interrelated lookups (ie, lookup that is driven by a field that is populated by a lookup).  You can try and avoid that with the addition of a few extra hidden fields to hold data - I typically just have an entire section I call "Logic Fields" and hide the whole section with a field rule so I can just add fields to it as needed.

 

You may need to combine adding a few more hidden fields with populating some things via formula or javascript, but if you do, you should be able to get a working solution.  If you want to collaborate on some more specific questions, let me know and I'll see if I can help.

3 0

Replies

replied on May 16, 2022

Is this using the classic or modern Forms designer? Can you post screen shots of your lookup rules?

0 0
replied on May 16, 2022 Show version history

We are using the classic designer.  We have ended up using at least a little bit of javascript on every single Form we're using, so the new designer is a no-go for us for now.  This Form has a total of 14 lookup rules; should I post all of them?

Here is the lookup rule in question (I currently have the auto-fill button option selected as a bypass):

0 0
replied on May 16, 2022 Show version history

Hi Sean,

Could you also provide details on how trigger fields 'Inmate Booking No:', 'Date of Visit:' and 'Visit Time:' are filled? For instance, are they filled by another lookup rule?

Also, do you have any custom JavaScript to trigger lookup rule?

I was trying to recreate the issue but no success. The lookup rule does get triggered whenever one of trigger field changes, while doesn't return result regardless of value in other trigger fields.

0 0
replied on May 17, 2022

Hi Sean,

     Please open a support case with your Solution Provider and provide us with the downloaded process and screenshots for lookup rules configuration as well as an video to illustrate the issue so we can investigate on it. 

0 0
replied on May 17, 2022

Ziyan Chen I think you might be on to something here.  Probably what Blake Smith was going for as well.  These fields are all populated by lookup rules; the process is supposed to go like this:

Form opens -> lookup rule populates inmate selection from live data -> Based on Inmate Selection, options for Visit Day and Visit Time are populated -> When Visit Day is selected, Javascript calculates the date and populates the 'visit date' field -> some combination of Inmate, Visit Date, and Visit time used in multiple lookups

 

While I'm not sure why it's triggering without the Visit Date having been updated yet, it's probably significant that other primary fields are being populated, even though nothing is actually selected.

I'll take a closer look at the javascript.

0 0
replied on May 18, 2022

I was able to work around the issue by using JS to trigger a change only when the fields actually have a value in them.  It does seem to relate to having multiple inter-related lookups.  Any chance I can get more specific information on the case number Drew Ferrell referenced?  If they have already managed to isolate the conditions related to the problem, it will save me lots of time!

0 0
replied on May 20, 2022

Hi Sean,

     The support case Drew opened shows the default value of a field will be cleared when there a lookup rule to fill it and the return value for the lookup is empty, it is expected behavior and the behaviors are consistent between Forms 10.4.5 and Forms 11.

    For the issue you ran into, can you please open a support case as well and provide the process that you can reproduce the issue with as well as video to illustrate the issue.

0 0
replied on May 23, 2022

Thanks Xiuhong, I'll get to work on isolating the issue asap.

0 0
replied on May 16, 2022

We have a similar issue which sounds related, in our case we have a default value for the field (in case the lookup condition isn't met) but the default value is getting removed even though the lookup condition isn't met and prevents the form from being able to be submitted because the field is hidden by a field rule.  We use this scenario a lot in our forms processes.

This worked in Forms 10.4.5 and currently is preventing us from upgrading our production environment to Forms 11.

0 0
replied on May 16, 2022

Yeah, definitely sounds like the same thing.  Forms is running the lookup on incomplete information, which comes back with a null value and wipes out your default.  In my case it comes back with a value, it's just the wrong value because the query is incomplete.

0 0
replied on May 17, 2022

Hi Craig, 

     Did you open a support case for the issue you described with your Solution Provider? We saw similar support case recently but we could not reproduce it based on the information provided. Please provide more information to the support case for further investigation.  

0 0
replied on May 17, 2022

Hello Xiuhong, the case number is 224132. Please review this case and let us know if this is intended behavior in change from version 10-11 Forms. 

0 0
replied on May 19, 2022

Just one more quick update here, I've identified four of our Production Forms that were broken by the upgrade to LF 11 due to this lookup rule issue

1 0
replied on July 20, 2022

@████████what did you end up doing to work around this?  LF is gaslighting us by saying it worked this way in Forms 10.4.5 but it doesn't.

0 0
SELECTED ANSWER
replied on July 20, 2022

@████████ I never did find the time to really dig in and find the exact recipe for recreating the problem, but I was able to get a solution. 

In my experience the problem seems to arise when you have multiple interrelated lookups (ie, lookup that is driven by a field that is populated by a lookup).  You can try and avoid that with the addition of a few extra hidden fields to hold data - I typically just have an entire section I call "Logic Fields" and hide the whole section with a field rule so I can just add fields to it as needed.

 

You may need to combine adding a few more hidden fields with populating some things via formula or javascript, but if you do, you should be able to get a working solution.  If you want to collaborate on some more specific questions, let me know and I'll see if I can help.

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

Sign in to reply to this post.