4D v19

entity.first( )

Accueil

 
4D v19
entity.first( )

entity.first( )  


 

La méthode entity.first( ) renvoie une référence vers l'entité en première position dans la sélection d'entités.

Si l'entité n'appartient à aucune sélection d'entités existantes (c'est-à-dire que entity.getSelection( ) renvoie Null), la méthode renvoie une valeur Null.

Exemple  

 C_OBJECT($employees;$employee;$firstEmployee)
 $employees:=ds.Employee.query("lastName = :1";"H@") //Cette sélection d'entités contient 3 entités
 $employee:=$employees[2]
 $firstEmployee:=$employee.first() //$firstEmployee est la première entité de la sélection d'entités $employees



Voir aussi  

entity.last( )
entity.next( )
entity.previous( )
entitySelection.first( )

 
PROPRIÉTÉS 

Produit : 4D
Thème : ORDA - Entity

 
PAGE CONTENTS 
 
HISTORIQUE 

 
UTILISATION DE L'ARTICLE

4D - Langage ( 4D v19)
4D - Langage ( 4D v19.1)