Equinox Online Help - Language Reference - A to Z

Home

IsLookup

Applies to
SyntaxIsLookup(FieldName [, SearchExpression, IndexName] [, OperatorExpression, LimitfieldName])
Action[Function] Checks if a specified Lookup statement would return a value.
ScopeUsable anywhere.
Notes

This function performs the specified Lookup function, discards the result and returns True if it was successful or False otherwise.

In the relational version of the statement (with at least the first three arguments included) the first argument has no logical purpose, but must be supplied; any field from the target database will do.

After the function is executed, the SysError system workarea may take one of the following values:

  • 0 The statement was executed successfully.
  • 1 An error occurred.
  • 2 The record is locked by another user. Note that a value may still be read from a locked record.
CategoryRecord location
See Also CountRecords, CurrentTableName, FindRecord, FindRecordLock, GroupFindRecord, IsRecord, IsSameRecord, Lookup, LookupWrite, SameRecord
Example

This example tests if a new pupil's start date is during a school holiday. The remote table is indexed on the SchoolStart field and SysError returns True if a record exists such that StartDate is greater than or equal to SchoolStart and less than SchoolEnd.

if IsLookup(SchoolStart, StartDate, startidx, ge, SchoolEnd) = false then
Alert "Start date must not be during holiday Time"
ChangeObject CurrentObjectName
end if