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

Question

Question

Prevent A Lookup from Triggering

asked on August 10, 2020

I have a form that uses a lookup to pull in Student Information (First Name + Last Name + DOB) based on a Student ID.

I also need to give the user the ability to enter the student's First Name + Last Name + DOB to do a lookup to get the Student ID.

Of course populating field(s) in one set of data changes the value in the other set of data which triggers a lookup and then that lookup populates the field(s) in the other set of data which triggers a lookup....  Infinite looping lookups.

Is there a way to prevent the second lookup from triggering?  So if I type in the Student ID, I don't want the other lookup to trigger once the name and dob fields are populated.  And vice versa.

 

I know I could ask if they have a Student ID and then use separate groups of fields populated from the lookup.  I was just hoping to find a better way to do this.

 

 

 

0 0

Replies

replied on August 10, 2020

With multi-field lookups, you have the option of displaying a button to initiate the lookup, called "Show Autofill Button", and it shouldn't run unless you hit the button. Note that when you enable the button, it will show next to the bottom field of your criteria. If you want to change the verbiage of the button, you can use JavaScript or CSS.

That should work for looking up the ID number.

For using the ID number in the lookup, I think your options are:

  1. Add some other, hidden field that is always satisfied (student status, maybe?)
  2. Let it trigger the name/DOB lookup anyway. Since that will have the button to trigger the lookup, you shouldn't end up in a loop.
1 0
replied on August 11, 2020

 

Instead of have the Autofill Button and creating the extra field, I chose to have the user click a radio button of whether they have the StudentID or not. 

If they do have the StudentID, they type it in and the lookup runs to populate a set of fields (firstName1, lastName1 and DOB1). 

If they do not, they type in the first name, last name and date of birth in a different set of fields (firstName2, lastName2 and DOB2) and that populates StudentID2. 

Using Hide and Show based on the radio button.  And populating the template fields with both sets of data.

Thank you for your insight.  I'm relatively new at this and I attempt to find a different way to do things every time I create a form. 

Velma

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

Sign in to reply to this post.