FIELD Phone :=
@IfError(
@DbLookup(""; "Snapper" : "names.nsf"; "People";
@Right(Name; " ") + " , " + @Left(Name; " "); "OfficePhoneNumber");
"Not available")
This agent does the same thing, using @If instead of @IfError.
result := @DbLookup("";"Snapper":"names.nsf";"People";
@Right(Name;" ") + " , " + @Left(Name; " "); "OfficePhoneNumber");
FIELD Phone := @If(@IsError(result);"Not available";result)