A CR-LF delimited list of field names and information about those fields.
The name of the table containing the fields to examine.
A character, numeric, logical, or date data display format. Options are:
- "n" = field name
- "N" = uppercased field name
- "t" = simple field type
- "T" = full field type
- "W" = field width
- "D" = field decimal
- "R" = field rule (INCREMENT/CALCULATED=pression>)
Retrieve external tables field names (and other optional info) in a cr-lf separated list. format same as External_Field_Name_Get().
The TABLE.EXTERNAL_FIELD_INFO_GET() method returns a CR-LF delimited string of information (such as field name, type, and size) about a table. Note: The <TBL>.FIELD_INFO_DUMP() method has the same functionality as TABLE.EXTERNAL_FIELD_INFO_GET(), except that the former takes a table pointer instead of a table name.
dim tbl as P tbl = table.open("customer") ? tbl.Field_Info_Dump("n,t,W") = CUSTOMER_ID,C,8 FIRSTNAME,C,20 LASTNAME,C,20 COMPANY,C,32 PHONE,C,20 FAX,C,20 BILL_ADDRESS_1,C,40 BILL_ADDRESS_2,C,40 BILL_CITY,C,20 BILL_STATE_REGION,C,20 BILL_POSTAL_CODE,C,10 BILL_COUNTRY,C,20 SHIP_ADDRESS_1,C,40 SHIP_ADDRESS_2,C,40 SHIP_CITY,C,20 SHIP_STATE_REGION,C,20 SHIP_POSTAL_CODE,C,10 SHIP_COUNTRY,C,20 SHIP_SAME,L,1 EMAIL,C,60 RTFMEMO,M,10 MEMO,M,10
table.external_field_info_get() was added for population of task-lists in the editors - the table is required to be open in the same session - i.e. open the report designer for the customer list, from the task list, select interactive window, and type this command:
? TABLE.EXTERNAL_FIELD_INFO_GET("customer->firstname","N,W,D,T") = "FIRSTNAME,20,0,Character"
This works with variables as well - i.e:
dim shared foo as c ? TABLE.EXTERNAL_FIELD_INFO_GET("var->foo","N,W,D,T") = "FOO,254,0,Character"
This doesn't work if the table isn't already open. For standalone applications, it is better to get all the schema information at once using external_field_name_get:
? table.external_field_name_get("customer","N,W,D,T") = CUSTOMER_ID,8,0,Character FIRSTNAME,20,0,Character LASTNAME,20,0,Character COMPANY,32,0,Character