Auto Complete Validation

Hi,

I’m trying to use an auto complete field to allow part codes to be entered into a quote in a multiple record form but I’m struggling to find a way to make sure they get validated against the lookup table - if no entry exists in the lookup part I need an error to show to inform the user. The field otherwise allows an incorrect part code to be entered and then a SQL error is displayed on commit. Is there any way to enforce a valid value being selected in an auto complete field?

Thanks

Neil

Actually no, at least not on this moment. In the onvalidate you always need to do a check on those fields. Within standard dropdowns this is not the case as you can only select valid values and can set a field to required.

How/when does the OnValidate event fire? I’ve put a message in it for now just to see but it never seems to pop on the screen, when editing the record and clicking save it just drops back to the original screen with the original value in the field. Adding a new record just throws an SQL error and doesn’t fire the message I put into the onvalidate event?

Not all macro’s are supported within each and every event. If you want to see something happening you sometimes need to use echo’s. The onvalidate will be called everytime you click on update, insert or delete.