There are several ways you can use scripts to enhance a value list selection process. The following download file demos several options. All of these options permit text based partial data entry of names, but actually looks up and enters ID numbers. All of the methods permit duplicate names and provide ways for the user to select the correct name from a list of matching duplicates.
Feel free to reply with questions if you need help understanding how one of these methods works.
Ok, I think this gets me to where I want to be, but I am unsure of execution.. Let me run this up the flag pole.
I have 2 tables 1 shipment and 2 Phonebook
Phone book has these fields:
contact ID (unique#)
The shippment tracking side, The user will scan and enter the package into the system to be delivered later. I want them to add thename of the package owner by typing the last name. The last name then triggers a search. so If I type Mauer, there is only one result. as I tab out of the field, it populaes the first name, email and office location phone# etc to the data entry screen. If they type in Smith it will drop down like the first two drop downs in your example.
The second one functions the way I want it to. when you type in the description it narrows down to your closest selection. and if there are multiple smiths, you can look into the dropdown. The phone book table has a firstlast column where I ombine the names with a calculation. So that would probably be better to use.
But I don't really know where to start with making this start.
You start with the correct relationship:
PhoneBook::contact ID = Shipment::Contact ID
Regardless of which method you choose to use, your script will cause the selected contact info to appear by entering Contact ID of the selected person in to the Shipment::contact ID field. If you place the name, email, location fields from Phonebook on your shipment layout, the correct info will automatically appear when the ID number is entered by the script into the field.
Before you try to get a scripted method to work, you may want to start with a drop down on Shipment::ContactID similar to the drop down defined on the Prod ID field, then add the more enhanced options once you have this first drop down working. (It doesn't require any scripting.) Do you know how to create such a value list?
Here's how to explore the scripts found in this demo file:
In layout mode, you can select any one of thes search or drop down fields, right click them, select script trigger and you can see the name of the script that is performed so you know which script to open and examine. If you then click Select, you get a dialog box that shows you were the script is located in manage scripts and there's a gear drop down where you can select edit to open the script editor in order to look at the script.
Both drop downs use the same script but since they use different fields for the drop down they pass the text entered into the field as a parameter to the script. There's a second parameter, "Add" or "Current" that is used to help the script interact with the portal. You won't have a portal, so this won't be needed in your version of this script.
Any chance I can get you to look at my DB and tell me where I am going wrong? I have been over and over your enhanced value selection and I just can't seem to get this to work.
You can upload a copy of your file to a file share site and post the download link here if you want. Use the save a copy as | Clone option if your file contains info you don't want to make public.