From m204wiki
(Redirected from $UNQREC)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.