Difference between revisions of "FIELDINFO()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
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()]], [[FMT()]], [[INDEXKEY()]], [[LABEL()]], [[NDX()]], [[RTOS()]]
+
[[ADESC()]], [[AFIELDS()]], [[ASTORE()]], [[ASTRING()]], [[DBF()]], [[FIELD()]], [[FIELDNAME()]], [[FILTER()]], [[FLDCOUNT()]], [[FLDLIST()]], [[INDEXKEY()]], [[LABEL()]], [[NDX()]], [[RTOS()]]
 
+
  
 
==Description==
 
==Description==
Line 17: Line 14:
  
 
Otherwise, the information string is structured as follows:
 
Otherwise, the information string is structured as follows:
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 49: Line 45:
 
|-
 
|-
 
|}
 
|}
 
  
 
==Example==
 
==Example==
Line 59: Line 54:
 
</code>
 
</code>
  
 
==Products==
 
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]]

Revision as of 08:31, 10 February 2012

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