4D v19

entitySelection.contains( )

Home

 
4D v19
entitySelection.contains( )

entitySelection.contains( )  


 

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 

 
ARTICLE USAGE

4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)