I want to be able to populate a form field using a query.
The fields on the form are: Part Number, Quantity, and Vendor ID. My form, on click, will check to see if I have multiple vendors available for the specified part number. If there is only one, I want the field to be populated with the specific vendor id, otherwise if (vendors > 1) then I have a modal form that comes up with a list of the vendors for the specified part (this is already working). I am able to specify a vendor for each part, but I only want to have to do that if more than one vendor exists. So, what I guess I am asking for is a way to dynamically set the default value of my vendorID field to a valid number.
The fields on the form are: Part Number, Quantity, and Vendor ID. My form, on click, will check to see if I have multiple vendors available for the specified part number. If there is only one, I want the field to be populated with the specific vendor id, otherwise if (vendors > 1) then I have a modal form that comes up with a list of the vendors for the specified part (this is already working). I am able to specify a vendor for each part, but I only want to have to do that if more than one vendor exists. So, what I guess I am asking for is a way to dynamically set the default value of my vendorID field to a valid number.