4D v19

entity.first( )

Home

 
4D v19
entity.first( )

entity.first( )  


 

The entity.first( ) method returns a reference to the entity in first position of an entity selection.

If the entity does not belong to any existing entity selection (i.e. entity.getSelection( ) returns Null), the method returns a Null value.

Example  

 C_OBJECT($employees;$employee;$firstEmployee)
 $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities
 $employee:=$employees[2]
 $firstEmployee:=$employee.first() //$firstEmployee is the first entity of the $employees entity selection



See also 

entity.last( )
entity.next( )
entity.previous( )
entitySelection.first( )

 
PROPERTIES 

Product: 4D
Theme: ORDA - Entity

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)