Difference between revisions of "FIELDINFO()"

From Lianjapedia
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
  
 
==See Also==
 
==See Also==
[[ADESC()]], [[AFIELDS()]], [[ASTORE()]], [[ASTRING()]], [[DBF()]], [[FIELD()]], [[FIELDNAME()]], [[FILTER()]], [[FLDCOUNT()]], [[FLDLIST()]], [[INDEXKEY()]], [[LABEL()]], [[NDX()]], [[RTOS()]]
+
[[ADESC()]], [[AFIELDS()]], [[ASTORE()]], [[ASTRING()]], [[DBF()]], [[FIELD()]], [[FIELDCHOICES()]], [[FIELDNAME()]], [[FILTER()]], [[FLDCOUNT()]], [[FLDLIST()]], [[GETDATAMAPPING()]], [[INDEXKEY()]], [[LABEL()]], [[NDX()]], [[RTOS()]], [[SETDATAMAPPING()]]
  
 
==Description==
 
==Description==
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
Line 56: Line 56:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Table Basics]]
 
[[Category:Table Basics Functions]]
 
 
[[Category:Cursor Functions]]
 
[[Category:Cursor Functions]]

Latest revision as of 10:32, 23 March 2018

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