4D v16.3

OB Get type

Home

 
4D v16.3
OB Get type

OB Get type 


 

OB Get type ( object ; property ) -> Function result 
Parameter Type   Description
object  Object, Object Field in Structured object
property  Text in Property name
Function result  Longint in Property value type

The OB Get type command returns the type of value associated with the property of the language object.

object must have been defined using the C_OBJECT command or designate a 4D object field.

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 Longint 6
Is JSON null Longint 255
Is object Longint 38
Is real Longint 1
Is text Longint 2
Is undefined Longint 5
Object array Longint 39

Example  

We want to get the type of standard values:

 C_OBJECT($ref)
 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

 
PROPERTIES 

Product: 4D
Theme: Objects (Language)
Number: 1230

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v14
Modified: 4D v15

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)