Equinox Online Help - Language Reference - A to Z
IsDuplicate |
|
---|---|
Applies to | |
Syntax | IsDuplicate(IndexName [, SearchExpression]) |
Action | [Function] Checks for duplicate index values in the current table. |
Scope | Usable anywhere. |
Notes | This function looks for a specified index value in the current table and returns True if it exists. The current record is always ignored in the search. The IndexName argument is the name of the index to be used and the optional argument SearchExpression specifies the index value. If SearchExpression is omitted, the current record's own index value is used by default. Since the current record is ignored, True is only returned if the current record's index value is the same as that of another record. If IndexName does not exist, an error number is stored in the system workarea SysError. |
Category | Indexes |
See Also | BlankIndex, CopyIndex, CurrentIndex, GroupSetIndex, IndexFromName, IndexLastUsed, IsDuplicate, KeyValues, MakeKey, MarkIndex, ModifyIndex, NameFromIndex, SetExecuteIndex, SetIndex, UnmarkIndex, UpdateIndex |
Example | This example checks for duplicate account numbers. if IsDuplicate(AccnoIdx, accno) thenAlert "This account is already on file"end if |