Skip to main content

Less Than node

Description

The Less than node takes two inputs. It filters the items in your query by checking if the first input is lesser in value than the second input.

Usage

The Less than node is a condition, so it can be added to the query branch directly after the root node or a logical node.

alt text
alt text

It can be populated with these nodes:

Configuration

alt text
  • Swap - change the comparison node. If any segments hold values, they'll remain but the node types offered will be limited.

  • Delete - remove the node from the query.

  • Inclusive - enable this to make the condition "less than or equal to".

  • Link negated - enable this to invert the condition imposed by the node. Items must now fail the condition to be included in the query results.

Note

If you enable Link negated when comparing an Attribute node, the query will also fetch items where the attribute holds no value at all. If this isn't desirable, use the Greater than node instead!

Example

Fetch all inspections completed before 2021

In full detail:

Fetch items of the Inspections interface where their Completion Time attribute is less than 1 January 2021

alt text
See JSON code
{
"type": "Query",
"properties": {
"collectionCode": "Live",
"dodiCode": "designInterfaces_inspections"
},
"children": [
{
"type": "LessThan",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_tasksCompletionTime"
}
},
{
"type": "DateTime",
"properties": {
"value": ["2021-01-01T00:00:00.000Z"]
}
}
]
}
]
}