Skip to main content

Global Unique Code node

Description

The Global Unique Code node represents one or more specific designs by referencing their unique Design code property.

For example, the Design code for the Street Lights design is designs_streetLights.

If your query targets an interface, it'll probably fetch items from multiple designs. You can use this node to filter those items by design.

Usage

The Global Unique Code node is an input, so it can be added to the segments of comparison nodes.

alt text

It can be:

Configuration

alt text
  • Parameter - select a compatible parameter to use as a placeholder value (if any have been defined in the query).
  • Designs - select one or more designs that you want to compare.

Example

Fetch all assets in this area except for street lights and bollards

In full detail:

Fetch items of the Assets interface where their Geometry attribute is within a defined area, AND where their Design code property doesn't equal the Design code for Street Lights or Bollards

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": "And",
"children": [
{
"type": "GeomWithin",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_itemsGeometry"
}
},
{
"type": "Geometry",
"properties": {
"value": {
"type": "Polygon",
"coordinates": [
[
[-1.528451, 52.291276],
[-1.532371, 52.290544],
[-1.535095, 52.288647],
[-1.534088, 52.28752],
[-1.527428, 52.290062],
[-1.528451, 52.291276]
]
]
}
}
}
]
},
{
"type": "NotEquals",
"children": [
{
"type": "ItemProperty",
"properties": {
"itemPropertyName": "designCode"
}
},
{
"type": "Guc",
"properties": {
"value": ["designs_streetLights", "designs_bollards"]
}
}
]
}
]
}
]
}