Skip to main content

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:

An Equals node with two empty segments

Compatibility

The node fills one segment. The other must also hold a number.

NodeAccepted Value TypeNotes
Another CountNumberAlways a whole number
AttributeNumber
NumberNumberA fixed number you enter
Value From Item AttributeNumber
LengthNumber
Arithmetic nodesNumber

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.

A Greater than node comparing a count of Defects to 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]
}
}
]
}
]
}