sorcerer11
MIS
Hi everyone,
I have a field, that looks up values from a view, but if a value is not included in the view, it gives an Error message. Is their a way I can change this to give a more meaningfull error message. by the way, I do want the users to enter codes which are not in the view. Each time the document is refreshed it goes back to the standard error message. I'm having a problem getting the logic right in the formula.
Any help would be great, thanks.
This code runs in a field called Desc1
@If(StockCode1 !="" ;@DbLookup("";"server":"db.nsf";"myView";StockCode1;2);Desc1)
This script runs on QuerySave
If uidoc.fieldcontains("Desc1","ERROR" Then
Call uidoc.FieldSetText("Desc1","Code not in database."
End If
I have a field, that looks up values from a view, but if a value is not included in the view, it gives an Error message. Is their a way I can change this to give a more meaningfull error message. by the way, I do want the users to enter codes which are not in the view. Each time the document is refreshed it goes back to the standard error message. I'm having a problem getting the logic right in the formula.
Any help would be great, thanks.
This code runs in a field called Desc1
@If(StockCode1 !="" ;@DbLookup("";"server":"db.nsf";"myView";StockCode1;2);Desc1)
This script runs on QuerySave
If uidoc.fieldcontains("Desc1","ERROR" Then
Call uidoc.FieldSetText("Desc1","Code not in database."
End If