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

Question

Question

Multiple Lookups to Fill Same Fields

asked on March 10, 2015

We have a form that is used for new hires with an applicant id and current employees with an employee id.  The new hires do not get an employee id until their first day.  The employee id and applicant id fields are stored in different tables and are not related.  I have a field where they can put in an employee id and if it finds a match it fills in fields with their first and last names.  I have a different field where they can put in their applicant id and if it finds a match it fills in the same two fields with their first and last names.  

The issue is when it fills by employee id it fills in the fields with the appropriate info for a split second and then blanks them out.  When they fill in the application id it fills in the fields correctly.  This is because the order for the Lookup Rules is by Employee ID first and then Application ID second. If I switch their order then the results are opposite.  

Is there a way to fill the same fields from two different lookups or do I need to create duplicate first and last name fields and just hide the ones that aren't filled?  It would be nice where we had more control over these lookup rules so we don't have to duplicate work.

0 0

Replies

replied on March 10, 2015

What version of Forms are you using? I'm using Forms 9.2.1 and I can't recreate the issue.

I've setup a form with four single line fields for employee id, applicant id, first name, and last name. I have two lookup rules, the first one looks up the employee table and matches the employee id to then fill the first and last names. The second lookup rule looks up the applicant table and matches the applicant id to then fill the same first and last name fields.

When I start the process and first fill in an employee id and tab out of the field, it fills the first and last names properly and the values remain there. The applicant id field is left blank as there was nothing to input into it.

If I start a new process and skip the employee id field and fill out the applicant id field and tab out of it, the first and last names of the applicant are then filled in.

Here are screenshots of my form and lookup rules and sample form inputs:

0 0
replied on March 10, 2015

I have had similar problems, but have not had the time to research it further, but what Beau is exactly what is happening.

0 0
replied on March 10, 2015

As we can't recreate the issue in the general sense, it'd be best to open a support case with your reseller as there may be other factors that aren't immediately obvious.

0 0
replied on March 11, 2015

I imagine this is done by design. Imagine I enter a valid value into Employee ID and it fills in the first and last name field. Then if I change the Employee ID to an invalid Employee ID, it should empty out those fields as their is no longer a match and the last thing you want is for incorrect data in the fields. I have no issues with the way it is functioning but I would like more ability to control when certain lookups are used.  Something along the lines of when Employee ID is not empty and it matches via the lookup then use Employee ID to fill the fields.  Then there could be a second rule that said when Applicant ID is not empty and it matches via the lookup then use Applicant ID to fill the fields.  There just needs to be more logic available for the lookups that utilizes the other variables in the forms. Similar to the logic available in the field rules.

0 0
replied on March 11, 2015

The scenario about clearing out the lookup fields when the match field is changed to an invalid value works for me. For example, I enter a valid employee ID and the first and last names are filled. If I go back into the employee ID field and change that to an invalid value and tab out again, then the first and last name fields are cleared out.

I'm not as clear about what you're suggesting in the latter part of your post. I do see that the lookups can get confused when you input a valid employee ID and then a valid applicant ID and then modify the values by deleting the applicant ID and trying to get the first and last name back to what was found by the original employee ID entered in. You'd have to clear out the employee ID value, tab out of the field, go back into it and enter the value again for the lookup to re-run based off of that original value.

For that scenario though, it seems like it'd be better to just have the submitter first indicate whether they are an employee or applicant and then show the relevant ID field in the form rather than having both fields present and displayed.

0 0
replied on March 11, 2015

I don't want to get bogged down in this use case.  There are a ton of use cases for the lookups where we might only run certain lookups in certain cases depending on the values of variables.  I would like to see more flexibility in determining which lookups are run and what conditions trigger them running.

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

Sign in to reply to this post.