version 1.5
OP Get all field numbers (connectionID; tableFields; tableIDs; fieldIDs) Longint
Parameter | Type | Description | |
connectionID | Longint | Connection ID with the server | |
tableFields | Array | Array of field names in "[table]field" format | |
tableIDs | Array | Array of table numbers in the database | |
fieldIDs | Array | Array of field IDs in their tables | |
Function result | Longint | Error code result for the function |
Description
OP Get all field numbers returns in tableIDs and in fieldIDs the table and field numbers for the names of the tables and fields you pass in tableFields.
tableFields must be an array of type Text or String. You must use the "[Table]Field" name format.
The table and field names are not case-sensitive.
tableIDs and fieldIDs must be arrays of type Integer or Longint or Real.
Error Codes
If OP Get all field numbers executes successfully, it returns 0. Otherwise, this function returns one of the following errors:
Error Code | Description |
-108 | Not enough memory to perform this operation. |
-9981 | Invalid table/field number definition array sent. |
10128 | The 4D Open for 4th Dimension package has not been initialized. |
10135 | Invalid parameter type. |
10136 | The connection does not exist. |
10146 | Invalid field name(s). |
10154 | This command cannot be executed right now. |
10159 | The array(s) contain or will contain too many elements. |
Example
In this example, the file and field numbers are returned for the fields passed in the aFldNames array:
C_LONGINT($ErrCode) ARRAY LONGINT(aTables;6) ARRAY LONGINT(aFields;6) ARRAY STRING(15;aFldNames;6) aFldNames{1}:="[People]First Name" aFldNames{2}:="[People]Last Name" aFldNames{3}:="[Company]Address" aFldNames{4}:="[Company]City" aFldNames{5}:="[Company]ZIP" aFldNames{5}:="[Invoices]Amount" $ErrCode:=OP Get all field numbers (vConnectID;aFldNames;aTables;aFields)
See Also
Field, OP Count fields, OP Get fields properties, OP Get one field number.