Count node
Count linked items
The Count node represents the number of items referenced by a chosen Link attribute.
It's the only node in the Aggregation category.
Usage
This node is an input, so you can add it to the segments of:
-
these comparison nodes:
-
all Arithmetic nodes
Compatibility
The node fills one segment. The other must also hold a number.
| Node | Accepted Value Type | Notes |
|---|---|---|
| Another Count | Number | Always a whole number |
| Attribute | Number | |
| Number | Number | A fixed number you enter |
| Value From Item Attribute | Number | |
| Length | Number | |
| Arithmetic nodes | Number |
Options
Select the node to access its options:
-
Open in Pathfinder - use the Pathfinder to change the selected Link attribute. You can perform one or more "hops" to visit a linked design/interface, then choose one there.
-
Delete - remove the node from the segment.
Example
Fetch all street lights with more than 3 defects.
In AQS terms:
Fetch items of the Street Lights design where the count of their Defects Link attribute is greater than 3.
See JSON code
This code may reference designs, interfaces, attributes or items that don't exist in your company project.
{
"type": "Query",
"properties": {
"collectionCode": "Live",
"dodiCode": "designs_streetLights"
},
"children": [
{
"type": "GreaterThan",
"children": [
{
"type": "Count",
"properties": {
"groupBy": "attributes_defectsAssignableDefects"
}
},
{
"type": "Number",
"properties": {
"value": [3]
}
}
]
}
]
}