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

Home

 
4D v19.8
entitySelection.contains( )

entitySelection.contains( ) 


 

entitySelection.contains ( entity ) -> Result 
Parameter Type   Description
entity  Entity in Entity to evaluate
Result  Boolean in 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.

Example  

 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



See also 

entity.indexOf( )

 
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)