Difference between revisions of "FIELDINFO()"

From Lianjapedia
Jump to: navigation, search
Line 15: 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="100%"
!width=30%|#||Value
+
!width="30%"|#||Value
 
|-
 
|-
 
|1||Field name
 
|1||Field name

Revision as of 12:21, 1 February 2013

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(), FIELDNAME(), FILTER(), FLDCOUNT(), FLDLIST(), INDEXKEY(), LABEL(), NDX(), RTOS()

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