Equinox Online Help - Language Reference - A to Z

Home

IndexLastUsed

Applies to
SyntaxIndexLastUsed IndexItem, [UserNameExpression],[DateItem, TimeItem]
Action[Statement] Returns the date and time an index was last used.
ScopeUsable anywhere.
Notes

This is a way to detect old unused query indexes.

The supplied parameters DateItem and TimeItem are filled, with date and time values respectively, according to the last time the specified IndexItem was used.

The IndexItem parameter can be supplied by either the index name or an index variable. Either the date or time parameter can be omitted if for example the time is not relevant. If you are trying to find out when a private query index was last used you will need to supply the UserNameExpression as a parameter. If IndexItem does not exist SysError is set to one.

If the query index is a private query index, then using IndexLastUsed without a user name supplied will return the date and time the current user last used the index.

If the index is a shared index, IndexLastUsed is not updated and will contain the date and time of the first access to the index.

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

The following example outputs the date and time a particular index was used.

date uDate
time uTime

IndexLastUsed SalesQry, "JIMT", uDate, uTime
Print "SalesQry last used on " & uDate & " at " & uTime & "."