Difference between revisions of "FIELDNAME()"
Helengeorge (Talk | contribs) (→Class) |
Helengeorge (Talk | contribs) (→Products) |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
− | |||
==Purpose== | ==Purpose== | ||
Line 10: | Line 9: | ||
==See Also== | ==See Also== | ||
− | [[AFIELDS()]], [[DBF()]], [[FIELD()]], [[FILTER()]], [[FLDLIST()]], [[FMT()]], [[INDEXKEY()]], [[NDX()]] | + | [[AFIELDS()]], [[DBF()]], [[FIELD()]], [[FILTER()]], [[FLDLIST()]], [[FMT()]], [[INDEXKEY()]], [[NDX()]], [[RTOS()]] |
Line 37: | Line 36: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:Table Basics]] | [[Category:Table Basics]] | ||
[[Category:Table Basics Functions]] | [[Category:Table Basics Functions]] |
Latest revision as of 17:21, 27 November 2009
Purpose
Function to return field name
Syntax
FIELDNAME(<expN1>[,<workarea | alias>[,<expN3>]])
See Also
AFIELDS(), DBF(), FIELD(), FILTER(), FLDLIST(), FMT(), INDEXKEY(), NDX(), RTOS()
Description
The FIELDNAME() function is synonymous with the FIELD() function. It returns the name of the field <expN> in the table currently selected. 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 FIELDNAME() returns a null string. Field offsets start at 1. The FIELDNAME() function always returns a character string in upper case.
Example
use payroll declare fname[fcount()] for n=1 to fcount() fname[n] = fieldname(n) ?fname[n] next ? use demo go top ? fieldname(1,1,1) ACCOUNT_NO,C,5,00046
Products
Recital Server, Recital