<< Click to Display Table of Contents >> Counting the number of elements in an entity |
Overview
Sometimes it is needed to count the number of elements in an entity. Bizagi offers a function that counts the elements in both master and parametric entities.
For parameter entities, this function numbers enabled records only.
To number the elements in an entity you can use the following function:
CHelper.entityListCount(EntityName, Filter)
The following attributes are needed:
•EntityName: the entity name.
•Filter: the filter condition.
Example
Let's suppose we need to number all the business opportunities from the Opportunities entity. The expression would be as follows:
var opportunities = CHelper.entityListCount("Opportunities","");
To number the business opportunities closed as won from a specific customer, the expression would be:
var opportunities = CHelper.entityListCount("Opportunities","Customer = '352' AND Status ='won'");
Last Updated 1/6/2022 4:15:45 PM