Equinox Online Help - Language Reference - A to Z
ModifyIndex |
|
---|---|
Applies to | |
Syntax | ModifyIndex IndexItem, [NewNameExpression, IFlagsExpression, Item1, Start1Expression, LenExpression1, FFlagsExpression1, Item2, Start2Expression, LenExpression2, FFlagsExpression2, Item3, Start3Expression, LenExpression3, FFlagsExpression3, Item4, Start4Expression, LenExpression4, FFlagsExpression4] |
Action | [Statement] Modifies an existing query index. |
Scope | Usable anywhere. |
Notes | This statement allows you to modify a query index definition dynamically from within the method language. The target query index is specified by the IndexItem parameter whilst the optional newname parameter contains the new name if you are renaming the index. The index type is set using the IFlagsExpression parameter:
A combination of flags may be made by adding together the values. If the value 32 is supplied, and the following conditions are satisfied, Equinox alters the definition of the index for the current user only:
In this case, the index definition becomes different from the base definition. If you include the value 32 and one of these conditions is not satisfied, the system workarea SysError is set to a non-zero value and no changes are made. If you wish to return to the base definition, delete the current index instance in Index Management, or use ModifyIndex and do not include the value 32. Any field information specified overrides the current value. Item is the source field. StartExpression and LenExpression optionally specify a part of a field to index. The FFlagsExpression parameter can have the following values and can be added together:
Leave out any parameters that you don't wish to change (you must still include the commas, even if you leave out items). The system workarea SysError is set to a non-zero value if an error occurs, otherwise zero. All entries in the query index are removed for all users affected, and the index must be repopulated in the normal way, using MarkIndex and so on. |
Category | Indexes |
See Also | BlankIndex, CopyIndex, CurrentIndex, GroupSetIndex, IndexFromName, IndexLastUsed, IsDuplicate, KeyValues, MakeKey, MarkIndex, NameFromIndex, SetExecuteIndex, SetIndex, UnmarkIndex, UpdateIndex |
Example | This first example renames an index. ModifyIndex iCust, "iCustomer" The next example modifies the index flags to being a unique child. ModifyIndex iCustomer, , 1 + 4 The last example modifies the first field of an index to be in Descending order. ModifyIndex iCustomer, , , , , , 2 |