Equinox Online Help - Language Reference - A to Z

Home

MakeKey

Applies to
SyntaxMakeKey (Key1Expression [,Key2Expression, Key3Expression, Key4Expression])
Action[Function] Creates a key buffer for use with a multi-segment index
ScopeUsable anywhere.
Notes

This function returns a composite key buffer made from up to four separate key segments. Each KeyExpression can be any Equinox type. MakeKey returns a string containing binary values which can be passed to Find, FindRecord, Lookup, LookupWrite, Pick, PickRange, PickWrite, PickRecord and used as range values in batch process, reports, imports, exports and queries. The string which receives the value returned from MakeKey should be declared with no length.

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

This example makes a key buffer and passes it to FindRecord.

string KeyBuffer
date dDespatch

dDespatch = "13-10-95"

KeyBuffer = MakeKey (dDespatch, "Stores")
FindRecord EQ, KeyBuffer

This example tries to find a record for the current customer with today's date using the Lookup function (which only takes one search key parameter):

s = Lookup(CName, MakeKey(customer, Today),xNameDate)
If s = "" Then Print "No order today"