OB Get type
OB Get type ( object ; property ) : Integer
| Parameter | Type | Description | |
|---|---|---|---|
| object | Object | → | Structured object |
| property | Text | → | Property name |
| Function result | Integer | ← | Property value type |
History
| Release | Changes |
|---|---|
| 16 R6 | Modified |
| 16 R4 | Modified |
| 15 | Modified |
| 14 | Created |
Description
The OB Get type command returns the type of value associated with the property of the language object..
In the property parameter, pass the label of the property whose type you want to find out.
Note that the property parameter is case sensitive.
The command returns a longint indicating the type of value. You can compare this value with the following constants, found in the "Field and Variable Types" theme:
| Constant | Type | Value |
|---|---|---|
| Is Boolean | Integer | 6 |
| Is collection | Integer | 42 |
| Is date | Integer | 4 |
| Is null | Integer | 255 |
| Is object | Integer | 38 |
| Is real | Integer | 1 |
| Is text | Integer | 2 |
| Is undefined | Integer | 5 |
Note: For picture attributes, the command returns Is object.
Example
We want to get the type of standard values:
var $ref : Object
OB SET($ref;"name";"smith";"age";42)
$type:=OB Get type($ref;"name") //$type returns 2
$type2:=OB Get type($ref;"age") //$type2 returns 1
See also
OB GET PROPERTY NAMES
Value type
Properties
| Command number | 1230 |
| Thread safe | yes |