Manage Learn to apply best practices and optimize your operations.

Unique Value Validation

Noticed that someone has posted a lotusscript tip for ensuring unique values in
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

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...