$UnqRec

From m204wiki
Revision as of 15:28, 31 July 2014 by Mlarocca (talk | contribs) (Mlarocca moved page $UNQREC to $UnqRec: Lower case change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The $UNQREC function is used in conjunction with the ON FIELD CONSTRAINT CONFLICT unit and the UNIQUE field attribute.

If $UNQREC is invoked from an ON FCC unit following the detection of a uniqueness violation, it returns the record number of the record already containing the field name = value pair. At all other times, $UNQREC returns -1.

Use $UNQREC in conjunction with $UPDREC to find the record number of the unique record already stored ($UNQREC) and the record number of the non-unique record you are attempting to store ($UPDREC). The $UNQREC function takes no arguments.