this via a input validation formula. It will work regardless of upper/lower
case used by user.
It assumes that you have a field called "location" that must be unique in the
database and is required field.
You must have a hidden view called "delaer_locations" with the first column as
sorted, with formula value @Lowercase (location) and the second column with
formula value @Text ( @DocumentUniqueID ).
Input Translation formula:
@Trim ( location )
Input Validation formula:
REM "this is a required field that can have no duplicates";
temp := "";
@If ( location = ""; @Failure ( "Location is required" );
@Set ( "temp"; @DbLookup( "":"NoCache"; "":""; "dealer_locations";
@LowerCase (location); 2) );
@If ( !@IsError ( temp);
@If ( @Elements( temp) !=1; @Failure ( "More than one Location already
temp != @Text (@DocumentUniqueID); @Failure ("Location already
@Success ) ) )