Equinox Online Help - Language Reference - A to Z

Home

GroupSetIndex

Applies to
SyntaxGroupSetIndex GroupnameExpression, IndexItem [, UserLoginNameExpression] [, LowerLimit] [, UpperLimit]
Action[Statement] Selects IndexItem to be the current index within the group specified by GroupnameExpression.
ScopeOnly usable in forms.
Notes

You may also use the special parameters DefaultIndex and NoIndex. If you use NoIndex or DefaultIndex for a parent table, then the records appear in their default order. This is the same for a child table, except that DefaultIndex only gives access to children of the specified parent record, whereas NoIndex gives access to all child records.

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

GroupSetIndex doesn't try to set a position within a specified range, so under certain conditions it may start by displaying the last match, and then of course you only see one record in the child form because the others are scrolled off the top of the form. Use GroupFirstRecord after the GroupSetIndex to force it to display the records starting with the first match.

Returns SysError = 1 if the user specified is not found.

CategoryIndexes
See Also BlankIndex, CopyIndex, CurrentIndex, GroupSetIndex, IndexFromName, IndexLastUsed, IsDuplicate, KeyValues, MakeKey, MarkIndex, ModifyIndex, NameFromIndex, SetExecuteIndex, SetIndex, UnmarkIndex, UpdateIndex
Example

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

GroupSetIndex "STOCK", StockCode
GroupLastRecord "STOCK"

This example sets the upper and lower limits to use on a specified index. In this case the field AuthorID (from the Authors group) is being used comparatively with the index BookAuthorCodeGX (specified in the Books group) to display only those books written by the Author in the current record.

GroupSetIndex "Books", BookAuthorCodeGX,,AuthorID, AuthorID