Count the Number of Instances of an Entity
To count the number of instances there are of an entity, you use the Instance Count function. The syntax for this function is:
- InstanceCount(<relationship text>)
- the number of <relationship text>
For example, the Instance Count function could be used to determine the number of children belonging to the claimant as shown below.
Example rule | Input | Output |
---|---|---|
the child | the number of children that the claimant has | |
the number of children that the claimant has = InstanceCount(the claimant's children) |
Anthony | 4 |
Peter | ||
Rebecca | ||
Fiona |
For this rule to validate the following entities and relationship must be defined in the project: an entity 'the claimant' , an entity 'the child' and a one-to-many relationship 'the claimant's children'.