Difference between revisions of "FIELD()"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Class== | ==Class== | ||
− | + | Table Basics | |
Line 12: | Line 12: | ||
==See Also== | ==See Also== | ||
− | [[AFIELDS()]], [[DBF()]], [[FIELDNAME()]], [[FILTER()]], [[FMT()]], [[INDEXKEY()]], [[NDX()]] | + | [[AFIELDS()]], [[DBF()]], [[FIELDNAME()]], [[FILTER()]], [[FLDLIST()]], [[FMT()]], [[INDEXKEY()]], [[NDX()]] |
Line 42: | Line 42: | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
+ | [[Category:Table Basics]] | ||
+ | [[Category:Table Basics Functions]] |
Revision as of 11:02, 11 June 2009
Class
Table Basics
Purpose
Function to return field name
Syntax
FIELD(<expN1>[,<workarea | alias>[,<expN3>]])
See Also
AFIELDS(), DBF(), FIELDNAME(), FILTER(), FLDLIST(), FMT(), INDEXKEY(), NDX()
Description
The FIELD() function is synonymous with the FIELDNAME() function. It returns the name of the field <expN1> in the currently selected table. The optional <workarea | alias> parameter can be used to operate on the table in the specified workarea number, or with the specified table alias. If the optional <expN3> is specified and evaluates to 1, the field data type initial (e.g. 'C' for character), the field width and the field value will also be returned along with the fieldname in a comma separated string.
If <expN1> exceeds the number of fields in the table, or there is no currently selected table, then FIELD() returns a null string. Field offsets start at 1. The FIELD() function always returns a character string in upper case.
Example
use payroll declare fname[fcount()] for n=1 to fcount() fname[n] = field(n) ?fname[n] next ? use demo go top ? field(1,1,1) ACCOUNT_NO,C,5,00046
Products
Recital Database Server, Recital Mirage Server, Recital Terminal Developer