4D v17.4

entity.getSelection( )

Accueil

 
4D v17.4
entity.getSelection( )

entity.getSelection( )  


 

La méthode entity.getSelection( ) renvoie la sélection d'entités à laquelle appartient l'entité.

Si l'entité n'appartient pas à une sélection d'entités, la méthode renvoie Null.

Exemple  

 C_OBJET($emp;$employees;$employees2)
 $emp:=ds.Employee.get(672) // Cette entité n'appartient à aucune sélection d'entités
 $employees:=$emp.getSelection() // $employees renvoie Null
 
 $employees2:=ds.Employee.query("lastName=:1";"Smith") //Cette sélection d'entités contient 6 entités
 $emp:=$employees2[0]  // Cette entité appartient à une sélection d'entités
 
 ALERTE("La sélection d'entités contient "+Chaine($emp.getSelection().length)+" entité(s)")



Voir aussi  

ORDA - EntitySelection

 
PROPRIÉTÉS 

Produit : 4D
Thème : ORDA - Entity
Nom intl. : entity.getSelection( )

 
PAGE CONTENTS 
 
HISTORIQUE 

 
UTILISATION DE L'ARTICLE

4D - Langage ( 4D v17)
4D - Langage ( 4D v17.1)
4D - Langage ( 4D v17.2)
4D - Langage ( 4D v17.3)
4D - Langage ( 4D v17.4)