شمارش تعداد المانها در یک موجودیت
Original Bizagi title: Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Process wizard > Business Rules > Business Rules examples > Collections and entities > Counting the number of elements in an entity
اتوماسیون فرایند Low-code / محیط طراحی Studio Cloud / Bizagi Studio / Wizard فرایند / Ruleهای کسبوکار / قواعد کسبوکار / مثالهای Ruleهای کسبوکار / مجموعه ها و موجودیت ها / شمارش تعداد المانها در یک موجودیت
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