This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19.8
entitySelection.last( )

entitySelection.last( ) 


 

entitySelection.last () -> Result 
Parameter Type   Description
Result  Entity, Null in Reference to the last entity of the entity selection

The entitySelection.last( ) method returns a reference to the entity in the last position of the entity selection.

The result of this method is similar to:

 $entity:=$entitySel[length-1]

If the entity selection is empty, the method returns Null.

Example  

 C_OBJECT($entitySelection;$entity)
 $entitySelection:=ds.Emp.query("salary < :1";50000)
 If($entitySelection.length#0)
    $entity:=$entitySelection.last()
 End if



See also 

entitySelection.first( )

 
PROPERTIES 

Product: 4D
Theme: ORDA - EntitySelection

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17

 
ARTICLE USAGE

4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)