Difference between revisions of "KEY()"

From Recital Documentation Wiki
Jump to: navigation, search
(Class)
Line 1: Line 1:
 
 
 
==Purpose==
 
==Purpose==
 
Function to return the index key expression
 
Function to return the index key expression
Line 32: Line 30:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Indexing]]
 
[[Category:Indexing]]
 
[[Category:Indexing Functions]]
 
[[Category:Indexing Functions]]

Revision as of 16:48, 2 December 2009

Purpose

Function to return the index key expression


Syntax

KEY(<expN>)


See Also

DBF(), FCOUNT(), FIELD(), FILTER(), FMT(), INDEXEXT(), INDEXORDER(), LEN(), NDX()


Description

The KEY() function is synonymous with the INDEXKEY() function. The KEY() function returns the index key expression for index <expN>, or a null string if no index file exists. When used in conjunction with the INDEXORDER() function, the KEY() function will return the index key expression of the master index. The KEY() function always returns a character string in lower case.


Example

use accounts index acc_no, date_paid
? key(1)
acc_no + dtos(date_rec)
set order to 2
? key(indexorder())
dtos(date_paid) + str(amo_paid,11,2)
index on lower(left(company,20)) to company
? key(1)
lower(left(company,20))


Products

Recital Server, Recital