Equinox Online Help - Language Reference - A to Z

Home

GroupFindRecord

Applies to
SyntaxGroupFindRecord GroupnameExpression, OperatorExpression, Test1Expression [, Test2Expression, Test3Expression, Test4Expression]
Action[Statement] Finds a record in a particular group with a specified index value.
ScopeOnly usable in forms.
Notes

This statement varies from FindRecord by allowing you to specify a group via the GroupnameExpression parameter rather than defaulting to the current group. It searches for the first record with a specified index value. The search operates by comparing the current index with a test value. OperatorExpression is a 2 character code that defines the condition for the search. The possible codes for OperatorExpression are described in the following table.

  • LT Less than
  • LE Less than or equal to
  • EQ First equal to
  • QE Last equal to
  • GE Greater than or equal to
  • GT Greater than

The search is always carried out against the current index. You may therefore need to select the appropriate index using GroupSetIndex before starting the search.

Equinox indexes may be based on up to four fields. The search is conducted against each field separately and these values are supplied as the parameters Test1Expression to Test4Expression. You may use as many parameters as there are fields in the index. eg If an index uses two fields then you may search against the first indexed field only, or the first and second fields.

Also note that the search is based on index position rather than absolute value. This means that when using a reverse order index, the logic for greater than and less than is reversed. eg Searching for a reverse order numeric index value which is greater than 6 will return 5 rather than 7, because record 5 appears after record 6.

The system workarea SysError is set to a non-zero value if an error occurs, otherwise zero.

CategoryRecord location
See Also CountRecords, CurrentTableName, FindRecord, FindRecordLock, IsLookup, IsRecord, IsSameRecord, Lookup, LookupWrite, SameRecord
Example

This method selects an index which is based on the customer name and then finds a default record.

GroupSetIndex "STOCK", StockCode
GroupFindRecord "STOCK", EQ, "TR002"