New Response
Cancel
Copy to Archive
Move to Archive
Document Library
Main Topic
Kurt Tomicich
2005/02/15
Procedure
Reference
Subject:
Validate a field as unique Field Validation
Category:
Tips\ Notes\ Programming
Version:
Revision Date:
2005/02/15
Modified:
2005/03/07
Reviewers
Originator
Previous
Current
Future
Kurt Tomicich
Kurt Tomicich/KRT
None
None
For your shared fields, here is the input translation & validation formula:
FIELD:
DevNu
Input Translation:
@Trim (DevNu)
Input Validation:
vKey := DevNu;
vMSG := "DevNu is Required and Must be UNIQUE.";
vMultiple := vMSG + " This DevNu is listed MULTIPLE TIMES, Please Contact your Administator";
vUNID := @Text(@DocumentUniqueID);
vLookup := @DbLookup ( "":"NoCache"; @DbName; "vwReferenceDevNu"; vKey; 2);
@If ( vKey = ""; @Failure(vMSG); @IsError(vLookup); @Success; @Elements(vLookup) > 1; @Failure(vMultiple); vUNID = vLookup; @Success; @Failure (vMSG));
Submitted for review on 2/15/2005
Review completed by Kurt Tomicich on 3/7/2005
All Documents
   
By Author
   
By Category
   
By Alternate Name
   
Review Status
   
Help