I have a field which DBlookup a customer number from a view in a different DB
This works fine the field is a dialog list and set to editable, the view dialog for choices points to the correct DB and the field is returning the number OK. The field is mandatory.
I want to have validation that the field has been populated correctly via the Dialog Box so we don't get mispellings through Upper/Lower case and also that the user has not just entered garbled characters.
Obvioously when garbled stuff is entered the lookup returns the "ERROR: Server error: Entry not found in index" display but the user can still save the document.
The field Customer is called Customer, the field customer number is called CustomerNo.
We have a query save staetment script in the OLE script libary which is based on the MSDoclib.ntf template, I would like to know what value the "ERROR: Server error:..." error has if you want to express this as a condition in LS. What needs to go into my validation script below instead of the ???
If source.document.CustomerNo(0) = ??? Then
Msgbox "You must enter a correct customer name!",0+16, "Windows Title"
Call source.gotofield( "Customer" )
Continue = False