version 1.5
OP Get one field number (connectionID; tableField; tableID; fieldID) Longint
| Parameter | Type | Description | |
| connectionID | Longint | Connection ID with target server | |
| tableField | String | Name of the field in "[table]field" format | |
| tableID | Longint | Number of the table in the database | |
| fieldID | Longint | Number of the field in the table | |
| Function result | Longint | Error code result for the function |
Description
OP Get one field number returns tableID and fieldID for [TableName]fieldName passed in tableField. The table and field name are not case-sensitive.
Error Codes
If OP Get one field number 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. |
| -9972 | File number is out of range. |
| -9981 | Invalid table/field number definition array sent. |
| 10128 | The 4D Open for 4th Dimension package has not been initialized. |
| 10136 | The connection does not exist. |
| 10146 | Invalid field name(s). |
| 10154 | This command cannot be executed right now. |
Example
In this example, the file and field number are returned for the "[Customer]Full name" field:
C_LONGINT($ErrCode;vTable;vField)
$ErrCode:=OP Get one field number (vConnectID;"[Customer]Full Name";vTable;vField)
If ($ErrCode=0)
ALERT("Table number: "+String(vTable)+Char(13)+"Field number: "+String(vField))
End if
See Also
Field, OP Get all field numbers, OP Get fields properties.