Click or drag to resize

Key Function

X#
Returns the index key expression for an index tag or index file.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION Key(
	uIndex,
	uArea
) AS STRING CLIPPER
Request Example View Source

Parameters

uIndex (Optional)
Type: Usual
uArea (Optional)
Type: Usual

Return Value

Type: String
Character
Remarks
An index key expression is specified when an index tag or index file is created with Index. The index key expression determines how a table is displayed and accessed when the index tag or index file is opened as the master controlling index tag or file. For more information on creating index tags, index files, and index key expressions, see Index.
Examples
X#
 1Close Databases
 2Open Database (HOME(2) + 'Data\testdata')
 3Use Customer     // Open customer table
 4Clear
 5For nCount = 1 TO TAGCOUNT( )
 6IF !EMPTY(TAG(nCount))  // Checks for tags in the index
 7? TAG(nCount) + ' '  // Display tag name
 8?? KEY(nCount)  // Display index expression
 9ELSE
10EXIT  // Exit the loop when no more tags are found
11ENDIF
12ENDFor
See Also