Value From Item Attribute node
Read an attribute value from other items
The Value from item attribute node represents the value of a specific attribute on one or more items from any design/interface you choose.
It's similar to an Attribute node but has a wider scope. It represents an actual value, not a reference - it stays fixed to whichever item(s) you choose, regardless of which item is being evaluated.
See comparison
| Attribute Node | Value From Item Attribute Node | |
|---|---|---|
| What items can be accessed? | Each item fetched by the query | Any items from a specific design/interface |
| Can you access specific items? | No | Yes |
| Can you access items outside the query's results? | No | Yes |
| Does the value change per queried item? | Yes - it's a live reference | No - it's a fixed value |
Usage
This node is an input, so you can add it to the segments of:
-
these comparison nodes:
-
all Arithmetic nodes
Compatibility
This node fills one segment. The other must produce a matching value from the queried items.
| Node | Accepted Value Type | Notes |
|---|---|---|
| Attribute | Any except Geometry | Use the Pathfinder to choose an attribute, on the queried item or a linked item |
| Attribute (Geometry) | Geometry | Only compatible with Within / Intersects / Disjoint |
| Property (Item Id) | Item Id | Only compatible with Equals / Not equals. Use the Pathfinder to choose the property, on the queried item or a linked item |
| Property (Last edit date) | Date Time | Only compatible with Less than / Greater than |
| Count | Number | |
| Length | Number | |
| Arithmetic nodes | Number |
Options
Select the node to access its options:
- Delete - remove the node from the segment.
- Parameter - select a compatible parameter to use as a placeholder. The value is provided when the query runs.
Alternatively, set the value directly:
-
Design or interface - target items of a design, or items of designs implementing an interface. Defaults to the one being queried.
-
Items - select one or more items of the chosen design/interface. Multiple values only apply to Equals / Not equals.
-
Attribute - choose the attribute you want to read on each selected item. Defaults to the first.
Example
Fetch all assets within a particular depot's grounds.
In AQS terms:
Fetch items of the Assets interface where their Geometry attribute intersects with the Geometry attribute of a specific Locations of Interest item.
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": "designInterfaces_assets"
},
"children": [
{
"type": "GeomIntersects",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_itemsGeometry"
}
},
{
"type": "ValueFromItemAttribute",
"properties": {
"attributeCode": "attributes_itemsGeometry",
"dodiCode": "designs_locationsOfInterest",
"value": ["62444aed8b3eaf015886b3ca"]
}
}
]
}
]
}