This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
entity.getSelection( )
|
entity.getSelection () -> Result | ||||||||
Parameter | Type | Description | ||||||
Result | EntitySelection, Null |
![]() |
Entity selection to which the entity belongs | |||||
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.
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")
Product: 4D
Theme: ORDA - Entity
Created: 4D v17
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)