Length node
Count the characters in a text value
The Length node takes one input and counts the number of characters in it, e.g. hello = 4.
It's the only node in the String operator category.
Usage
This node is a function, so you can add it to the segments of these comparison nodes:
as well as the segments of Arithmetic nodes.
Compatibility
The node's own segment must hold a Text value.
| Node | Accepted Value Type |
|---|---|
| Attribute | Text |
| Text | Text |
| Value From Item Attribute | Text |
When comparing Length, the other segment must hold a Number value.
| Node | Accepted Value Type |
|---|---|
| Another Length | Number |
| Attribute | Number |
| Count | Number |
| Number | Number |
| Value From Item Attribute | Number |
| Arithmetic nodes | Number |
Options
Select the node to access its options:
-
Swap - use another function. If any segments are populated, only compatible nodes are listed.
-
Delete - remove the node from the segment.
Example
Fetch all defects with a description longer than 200 characters.
In AQS terms:
Fetch items of the Defects interface where the length of their Description attribute is greater than 200.
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": "designInterfaces_defects"
},
"children": [
{
"type": "GreaterThan",
"children": [
{
"type": "Length",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_defectsDescription"
}
}
]
},
{
"type": "Number",
"properties": {
"value": [200]
}
}
]
}
]
}