4D v19

entitySelection.count( )

Home

 
4D v19
entitySelection.count( )

entitySelection.count( )  


 

The entitySelection.count( ) method returns the number of entities in the entity selection with a non-null value in attributePath.

Note: Only scalar values are taken into account. Object or collection type values are considered as null values.

An error is returned if:

Example  

We want to find out the total number of employees for a company without counting any whose job title has not been specified:

 C_OBJECT($sel)
 C_REAL($count)
 
 $sel:=ds.Employee.query("employer = :1";"Acme, Inc")
 $count:=$sel.count("jobtitle")



See also 

entitySelection.average( )
entitySelection.distinct( )
entitySelection.length
entitySelection.sum( )

 
PROPERTIES 

Product: 4D
Theme: ORDA - EntitySelection

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

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