Difference between revisions of "TAGFOR()"

From Lianjapedia
Jump to: navigation, search
(Created page with '==Purpose== Function to return the 'for' expression of an index tag ==Syntax== TAGFOR(<tag name>[,<.dbx filename>[,<alias>]]) ==See Also== KEY(), MDX(), ORDER(), [[…')
 
Line 12: Line 12:
  
  
{| class="wikitable"
+
{| class="wikitable" width=100%
!Parameter||Description
+
!width=30%|Parameter||Description
 
|-
 
|-
 
|<tag name>||The name of the tag
 
|<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..
+
|valign=top|<.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:
+
|valign=top|<alias>||The workarea in which to operate.  Specified in any of the following ways:
 
A workarea number.
 
A workarea number.
 
A workarea letter: A-Z (a-z) excluding M (m).
 
A workarea letter: A-Z (a-z) excluding M (m).

Revision as of 10:55, 24 January 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.)'