TAG( ) Function
Returns a tag name from an open compound index (.cdx) file or the name of an open single-entry (.idx) index file.
TAG([CDXFileName[, nTagNumber[, nWorkArea | cTableAlias]]]) |
Parameters
- CDXFileName
-
Specifies the name of the .cdx file to return a tag name from.
- nTagNumber
-
Specifies a number corresponding to the order in which a tag was created in the compound index file.
For example, if nTagNumber is 1, TAG( ) returns the name of the first tag created in the compound index file. If nTagNumber is 2, TAG( ) returns the name of the second tag created, and so on. TAG( ) returns the empty string when nTagNumber exceeds the number of tag names.
If you omit CDXFileName, TAG( ) returns compound index file tag names and single-entry index file names in a specific order as follows:
-
Names of single-entry index files are returned based on their order in the INDEX clause of USE or SET INDEX. For more information, see USE Command and SET INDEX Command.
-
Tag names from the structural compound index file (if one exists for the table) are returned.
-
Tag names from other open compound index files are returned, again in the order in which the tags were created in the compound index files and in the order in which the compound index files are specified in the INDEX clause for USE or SET INDEX.
-
- nWorkArea| cTableAlias
-
Returns tag names and index file names from files open in another work area. nWorkArea specifies a work area number and cTableAlias specifies a table alias. By default, tag names and index file names are returned from files in the current work area.
Return Value
Remarks
Example
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic
Note 
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08