4D v19

entity.previous( )

Home

 
4D v19
entity.previous( )

entity.previous( )  


 

The entity.previous( ) method returns a reference to the previous entity in the 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.

If there is no valid previous entity in the entity selection (i.e. you are on the first entity of the selection), the method returns Null. If the previous entity has been dropped, the method returns the previous valid entity (and eventually Null).

Example  

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



See also 

entity.first( )
entity.last( )
entity.next( )

 
PROPERTIES 

Product: 4D
Theme: ORDA - Entity

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

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