Function OrdKeyAdd() Foundation

Manually add key value to a custom order

Syntax
OrdKeyAdd([<cTagName>|<nIndex>]) -> lSuccess
Parameters
<cTagName>
<cTagName> is a character string specifying the tag name of the custom order.
<nIndex>
<nIndex> is a positive integer specifying the ordinal position of the custom order within the work area.
Return

The return value of OrdKeyAdd() is .T. (true) if the key values has been succesfully added to the index. Otherwise it is .F. (false).

Description

The function OrdKeyAdd() adds a key value to a custom index. A custom index is an index which is not automatically maintained by the Xbase++ runtime. Instead key values have to be explicit added and/or removed. To explicit delete key values from a custom index OrdKeyRemoved() must be used.

OrdKeyAdd() evaluates the index expression to calculate the key-value, it then adds the key for the current record to the index. If the index has a FOR condition the key will only be added if the FOR condition is met.

The same record can be added multiple times.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.