| 
                    
 This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com  | 
            |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
                 
                
  | 
                
					
                    
                         
    4D v20.6
 
OB Is empty 
                                
                                
        
 | 
                ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OB Is empty ( object ) -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| object | Object, Object Field | 
             
         | 
        Structured object | |||||
| Function result | Boolean | 
             
         | 
        True if object is empty or undefined, otherwise False | |||||
The OB Is empty command returns True if object is undefined or empty, and False if object is defined (initialized) and contains at least one property.
object must have been created using the C_OBJECT command or designate a 4D object field.
Here are the different results of this command as well as the OB Is defined command, depending on the context:
 C_OBJECT($ref)
 $empty:=OB Is empty($ref) // True
 $def:=OB Is defined($ref) // False
 
 OB SET($ref;"name";"Susie";"age";4)
  // $ref="{"name":"Susie","age":4}"
 $empty:=OB Is empty($ref) // False
 $def:=OB Is defined($ref) // True
 
 OB REMOVE($ref;"name")
 OB REMOVE($ref;"age")
 $empty:=OB Is empty($ref) // True
 $def:=OB Is defined($ref) // True
	Product:  4D
	Theme:  Objects (Language)
	Number:  
        1297
        
        
        
	
	Created:  4D v14
	Modified:  4D v15
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v20)
	
	
	4D Language Reference ( 4D v20.1)
	
	
	
	4D Language Reference ( 4D v20.2)
	
	4D Language Reference ( 4D v20.3)
	
	4D Language Reference ( 4D v20.4)
	
	
	4D Language Reference ( 4D v20.5)
	4D Language Reference ( 4D v20.6)
	
	
	
Add a comment