a db. Here is the @formula version to be used in a validation formula section.
for the formula to work, there must be a hidden view that the @dblookup can
grab the unid in the 2nd column based on the lookup value.
for this example I check to see that user must enter a value for the field
CategoryValue and that the value entered must be unique for the db. but if the
value exists and is found in the same doc, the @failure is not activated.
Result := @DbLookup( "" : "NoCache" ; currentserver : currentdb ; "HiddenView"
; CategoryValue ; 2);
UniqueKey := @If(@IsError(Result); "yes"; Result = ""; "yes"; @IsNewDoc &
Result != ""; "no"; Result = @Text(@DocumentUniqueID); "yes";"no");
@If(CategoryValue = "";@Failure("Subkey cannot be empty."); UniqueKey = "no";
@Failure("Category value already exists. Please enter a unique