This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
entitySelection.contains( )
|
entitySelection.contains ( entity ) -> Result | ||||||||
Parameter | Type | Description | ||||||
entity | Entity |
![]() |
Entity to evaluate | |||||
Result | Boolean |
![]() |
True if the entity belongs to the entity selection, else False | |||||
The entitySelection.contains( ) method returns true if entity reference belongs to the entity selection, and false otherwise.
In entity, specify the entity to search for in the entity selection. If entity is Null, the method will return false.
If entity and the entity selection do not belong to the same dataclass, an error is raised.
C_OBJECT($employees;$employee)
$employees:=ds.Employee.query("lastName=:1";"H@")
$employee:=ds.Employee.get(610)
If($employees.contains($employee))
ALERT("The entity with primary key 610 has a last name beginning with H")
Else
ALERT("The entity with primary key 610 does not have a last name beginning with H")
End if
Product: 4D
Theme: ORDA - EntitySelection
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)