Length node
Description
A Length node takes one input. It counts the number of characters in the inputted text, e.g. hello = 4
Usage
The Length node is an input, so it can be added to the segments of comparison nodes and other 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
- Value From Item Attribute (of Number type)
- all Arithmetic nodes
-
populated with these nodes:
- Attribute (of Text type)
- Text node
- Value From Item Attribute (of Text type)
Configuration
-
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.
Example
Fetch all defects with a description longer than 200 characters
In full detail:
Fetch items of the Defects interface where the length of their Description attribute is greater than 200
See JSON code
{
"type": "Query",
"properties": {
"collectionCode": "Live",
"dodiCode": "designInterfaces_defects"
},
"children": [
{
"type": "GreaterThan",
"children": [
{
"type": "Length",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_defectsDescription"
}
}
]
},
{
"type": "Number",
"properties": {
"value": [200]
}
}
]
}
]
}