Number node
Description
The Number node represents one or more numbers, which can be:
-
whole or decimal, e.g. 42, 3.1415
-
positive or negative, e.g. 8, -690.22
Usage
The Number node is an input, so it can be added to the segments of comparison nodes and functions.
It can be:
-
added to these comparison nodes:
- Equals
- Greater than
- Less than
- Not Equals
-
compared against these nodes:
- Attribute (of Number type)
- Count
- Length
- all Arithmetic nodes
Configuration
- Parameter - select a compatible parameter to use as a placeholder value (if any have been defined in the query).
-
Value - type in a number.
-
Add - add another Value field to the node. Select to remove.
Example
Fetch all street lights with a column over 8 metres tall
In full detail:
Fetch items of the Street Lights design where their Column Height attribute is greater than 8
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": "designs_streetLights"
},
"children": [
{
"type": "GreaterThan",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_streetLightsColumnHeight_5e1db714ca31500ad87c5d18"
}
},
{
"type": "Number",
"properties": {
"value": [8]
}
}
]
}
]
}