Floor node
Description
The Floor node takes one number as input and rounds it down to the previous whole number, e.g. 9.98 becomes 9
Usage
This node is a function. It can be added to the segments of comparison nodes and other functions.
It can be:
-
added to these comparison nodes:
-
compared against, and populated with, these nodes:
- Attribute (of Number type)
- Count
- Number
- Length
- all other Arithmetic nodes
Options
Select the node to access its options:
-
Swap - use a different function node. Any populated segments are kept, which limits the options.
-
Delete - remove the node from the segment.
Example
Fetch all Trees with a crown base of 2 metres when rounded up or down
In full detail:
Fetch items of the Trees design where the ceiling of their Crown Base (m) attribute equals 2 OR the floor of their Crown Base (m) attribute equals 2
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_trees"
},
"children": [
{
"type": "Or",
"children": [
{
"type": "Equals",
"children": [
{
"type": "Number",
"properties": {
"value": [2]
}
},
{
"type": "Ceiling",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_treesCrownBase"
}
}
]
}
]
},
{
"type": "Equals",
"children": [
{
"type": "Number",
"properties": {
"value": [2]
}
},
{
"type": "Floor",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_treesCrownBase"
}
}
]
}
]
}
]
}
]
}

