Manage Learn to apply best practices and optimize your operations.

Prevent Duplicate Field Values - On Input Validation

This tip helps you prevent users from entering duplicate field values. It does
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" );
@Do (
@Set ( "temp"; @DbLookup( "":"NoCache"; "":""; "dealer_locations";
@LowerCase (location); 2) );
@If ( !@IsError ( temp);
@If ( @Elements( temp) !=1; @Failure ( "More than one Location already
exists" );
temp != @Text (@DocumentUniqueID); @Failure ("Location already
exists"); @Success);
@Success ) ) )

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchDataCenter

SearchContentManagement

Close