Xbasic
A5_GET_FIELDNAMES Function
Syntax
Field_List as C = a5_get_fieldnames(C table_setname [,C flags [,L top_level_only [,L fully_qualify_parent_fields ]]])
Arguments
- table_setname
The name of a table or set, including the ".DBF" or ".SET" file name extension. Character
- flags
A character, numeric, logical, or date data display format. Options are:
- top_level_only
Logical. Optional. Default = .F. .T. = Includes top level table and one-to-one linked tables, .F. = Includes all tables in the set.
- fully_qualify_parent_fields
Logical. Optional. Default = .F. .T. = places the table name before the names of parent table fields. .F. = does not place the table name before the names of parent table fields.
Returns
- Field_ListCharacter
A CR-LF delimited list of field names from the table or set. Character
Description
Gets a list of fields in a table or set.
Discussion
The A5_GET_FIELDNAMES() function returns a list of the fields in a table or set.
Example
? a5_get_fieldnames("inventory.set") = Product_Id Description Cost Retail Re_Order Vendor Qty_In_Sto Vendor->Vendor_Id Vendor->Name Vendor->Address_1 Vendor->Address_2 Vendor->City Vendor->State_Region Vendor->Postal_Code Vendor->Country Vendor->Phone Vendor->Fax Vendor->Contact_Name ? a5_get_fieldnames("customer.dbf") = Customer_Id Firstname Lastname Company Phone Fax Bill_Address_1 Bill_Address_2 Bill_City Bill_State_Region Bill_Postal_Code Bill_Country Ship_Address_1 Ship_Address_2 Ship_City Ship_State_Region Ship_Postal_Code Ship_Country Ship_Same Email ? a5_get_fieldnames("invoice.set", "t", .f., .t.) = Invoice_Header->C Invoice_Header->C Invoice_Header->D Invoice_Header->C Invoice_Header->C Invoice_Header->C Invoice_Header->N Invoice_Header->N Invoice_Header->C Invoice_Header->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->C Customer->L Customer->C Invoice_Items->C Invoice_Items->C Invoice_Items->N Invoice_Items->N Invoice_Items->N Product->C Product->C Product->N Product->N Product->N Product->C Product->N Vendor->C Vendor->C Vendor->C Vendor->C Vendor->C Vendor->C Vendor->C Vendor->C Vendor->C Vendor->C Vendor->C
See Also