Hi, I have a simple table (tblSuppliers) for company name, address, city, state, zip and telephone. All works well as long as the company i want is in the the table. What I need is to add a new company if it doesn’t already exist. Also the SupplierID of this new company needs to be entered into the SupplierID field in tblInventory.
Any help greatly appreciated.
Thanks
Hello @Michael2115. To validate if the company exists, you can insert an ajax event that relates to the field where you capture the name in the onblur event and inside do a validation of the name if it exists or not, if it exists for example, clear the name field which you must define as mandatory and in this way you already have the validation control. You also have to make a validation in the onValidate event because it can happen that from the moment you validate in ajax until the moment you click on the save button, the company can be created by another user (coincidences that happen). Regarding the second point, what you should do is to create a select or auto-complete field which allows you to take from another table the id and display the description.
Thanks for the response, I’ll try your suggestion.