Difference between revisions of "TAGFOR()"

From Lianjapedia
Jump to: navigation, search
Line 37: Line 37:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Indexing]]
+
[[Category:Cursor Functions]]
[[Category:Indexing Functions]]
+
[[Category:Search Functions]]

Revision as of 11:18, 4 February 2013

Purpose

Function to return the 'for' expression of an index tag

Syntax

TAGFOR(<tag name>[,<.dbx filename>[,<alias>]])

See Also

KEY(), MDX(), ORDER(), SET INDEX, SET ORDER, TAG(), TAGCOUNT(), TAGEXPR(), TAGKEY(), TAGNO(), TAGUNIQUE()

Description

The TAGFOR() function returns the 'for' expression for the specified index tag. With no <alias> specified, the TAGFOR() function operates in the currently selected workarea. If the specified tag has no 'for' expression, TAGFOR() returns an empty string.


Parameter Description
<tag name> The name of the tag
<.dbx filename> The .dbx file which contains the tag. Only required if the same tag name exists in multiple .dbx files or the <alias> is specified..
<alias> The workarea in which to operate. Specified in any of the following ways:

A workarea number. A workarea letter: A-Z (a-z) excluding M (m). A table alias. The alias can be specified in the USE command. If not specified, the table basename is used.

Example

open database southwind
use customers
? tagfor("customerid") // returns empty string
? tagfor("label_germany") // returns 'CONTAINS("Germany", .f.)'
? tagno("label_germany", "customers.dbx", "customers") // returns 'CONTAINS("Germany", .f.)'