Skip to main content

Value From Item Attribute node

Description

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.

See comparison
Attribute NodeValue From Item Attribute Node
What items can be referenced?All qualifying items fetched by the queryAny items from a specific design/interface
Can you reference specific items?NoYes
Can you reference non-qualifying items?NoYes

Usage

The Value from item attribute node is an input, so it can be added to the segments of comparison nodes and functions.

alt text
alt text

It can be added to these comparison nodes:

Configuration

alt text
  • Parameter - select a compatible parameter to use as a placeholder value (if any have been defined in the query).
  • Design or interface - this defaults to the design/interface being queried. To change it, select it, and then choose one from the list.

  • Items - select this to show items from the design/interface chosen above. Select the items you wish to reference.

  • Attribute - this defaults to the first attribute on the design/interface being queried. Select this to show attributes from the design/interface chosen above. Select the attribute you wish to reference (on the items selected above).

Example

Fetch all assets within a town's boundary

In full detail:

Fetch items of the Assets interface where their Geometry attribute intersects with the Geometry attribute of a specific item from the Town boundaries design

alt text
See JSON code

This code may reference designs, interfaces, attributes or items that don't exist in your Alloy database.

{
"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_townBoundaries_624449418b3eaf015886aeea",
"value": ["62444aed8b3eaf015886b3ca"]
}
}
]
}
]
}