Difference between revisions of "FIELDINFO()"
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return a string containing comma-separated information about a specified field | Function to return a string containing comma-separated information about a specified field | ||
− | |||
==Syntax== | ==Syntax== | ||
FIELDINFO(<expN1> [, <expN2>]) | FIELDINFO(<expN1> [, <expN2>]) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[ADESC()]], [[AFIELDS()]], [[ASTORE()]], [[ASTRING()]], [[DBF()]], [[FIELD()]], [[FIELDNAME()]], [[FILTER()]], [[FLDCOUNT()]], [[FLDLIST()]], [[ | + | [[ADESC()]], [[AFIELDS()]], [[ASTORE()]], [[ASTRING()]], [[DBF()]], [[FIELD()]], [[FIELDCHOICES()]], [[FIELDNAME()]], [[FILTER()]], [[FLDCOUNT()]], [[FLDLIST()]], [[GETDATAMAPPING()]], [[INDEXKEY()]], [[LABEL()]], [[NDX()]], [[RTOS()]], [[SETDATAMAPPING()]] |
− | + | ||
==Description== | ==Description== | ||
Line 18: | Line 15: | ||
Otherwise, the information string is structured as follows: | Otherwise, the information string is structured as follows: | ||
− | + | {| class="wikitable" width="100%" | |
− | {| class="wikitable" | + | !width="30%"|#||Value |
− | !#||Value | + | |
|- | |- | ||
|1||Field name | |1||Field name | ||
Line 49: | Line 45: | ||
|- | |- | ||
|} | |} | ||
− | |||
==Example== | ==Example== | ||
Line 59: | Line 54: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | [[Category: | + | [[Category:Cursor Functions]] |
− | + |
Latest revision as of 10:32, 23 March 2018
Contents
Purpose
Function to return a string containing comma-separated information about a specified field
Syntax
FIELDINFO(<expN1> [, <expN2>])
See Also
ADESC(), AFIELDS(), ASTORE(), ASTRING(), DBF(), FIELD(), FIELDCHOICES(), FIELDNAME(), FILTER(), FLDCOUNT(), FLDLIST(), GETDATAMAPPING(), INDEXKEY(), LABEL(), NDX(), RTOS(), SETDATAMAPPING()
Description
The FIELDINFO() function is used to return a string containing comma-separated information about a specified field <expN1> in the currently selected table or the workarea/cursor numbered <expN2>. Fields are numbered from 1 to FLDCOUNT() according to their position in the table structure.
If <expN1> exceeds the number of fields in the table, or there is no currently selected table or no table open in workarea <expN2>, then FIELDINFO() returns a null string.
Otherwise, the information string is structured as follows:
# | Value |
---|---|
1 | Field name |
2 | Field type |
3 | Field width |
4 | Field decimals |
5 | Field description |
6 | Field default value |
7 | Field picture value |
8 | Field choices value |
9 | Field validation expression |
10 | Field validation error text |
11 | Field help/tooltip text |
12 | Field mandatory ("1" if True) |
13 | Field autoinc ("1" if True) |
Example
open database southwind use example astore(a_info,fieldinfo(1,1),",") display memory