4D v18

entitySelection.contains( )

Accueil

 
4D v18
entitySelection.contains( )

entitySelection.contains( )  


 

La méthode entitySelection.contains( ) retourne vrai si la référence d'entity appartient à la sélection d'entités, et faux sinon.

Dans entity, spécifiez l'entité à rechercher dans la sélection d'entités. Si l'entité est Null, la méthode retournera faux.

Si entity et la sélection d'entités n'appartiennent pas à la même dataclass, une erreur est générée.

Exemple  

 C_OBJET($employees;$employee)
 
 $employees:=ds.Employee.query("lastName=:1";"H@")
 $employee:=ds.Employee.get(610)
 
 Si($employees.contains($employee))
    ALERTE("L'entité ayant la clé primaire 610 a un nom commençant par H")
 Sinon
    ALERTE("L'entité ayant la clé primaire 610 n'a pas un nom commençant par H")
 Fin de si



Voir aussi  

entity.indexOf( )

 
PROPRIÉTÉS 

Produit : 4D
Thème : ORDA - EntitySelection
Nom intl. : entitySelection.contains( )

 
PAGE CONTENTS 
 
HISTORIQUE 

 
UTILISATION DE L'ARTICLE

4D - Langage ( 4D v18)