Skip to main content

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.

An Equals node with a Length function filling one of its empty segments

Compatibility

The node's own segment must hold a Text value.

NodeAccepted Value Type
AttributeText
TextText
Value From Item AttributeText

When comparing Length, the other segment must hold a Number value.

NodeAccepted Value Type
Another LengthNumber
AttributeNumber
CountNumber
NumberNumber
Value From Item AttributeNumber
Arithmetic nodesNumber

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.

A Greater than node comparing the Length of the Description attribute to 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]
}
}
]
}
]
}