4D v17.4

entity.getSelection( )

Home

 
4D v17.4
entity.getSelection( )

entity.getSelection( )  


 

The entity.getSelection( ) method returns the entity selection which the entity belongs to.

If the entity does not belong to an entity selection, the method returns Null.

Example  

 C_OBJECT($emp;$employees;$employees2)
 $emp:=ds.Employee.get(672) // This entity does not belong to any entity selection
 $employees:=$emp.getSelection() // $employees is Null
 
 $employees2:=ds.Employee.query("lastName=:1";"Smith") //This entity selection contains 6 entities
 $emp:=$employees2[0]  // This entity belongs to an entity selection
 
 ALERT("The entity selection contains "+String($emp.getSelection().length)+" entities")



See also 

ORDA - EntitySelection

 
PROPERTIES 

Product: 4D
Theme: ORDA - Entity

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

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