Question
What is the difference between the len(), count(), and length() functions in Appian, and when should each be used?
pain07m
November 9, 2025
72
Answer
In Appian, len(), count(), and length() may seem similar but serve different purposes depending on the type of data you’re working with.
len( text ) :
Returns the length in characters of the text.
len("Appianverse")
Returns 11 as output
Example: In a form where the username must not exceed 20 characters:
if(len(ri!username) > 20, "Username too long", "Valid")
length( array )
This function returns the number of elements in an array.
In most cases, this function does not count null elements. length({null, 2}) returns 1 because the null is not counted.
Example
length({10, 20, 30})
Returns 3 as output.
Length of list with null values
length({10, null, 30})
Returns 2. Null values are skipped.
count( value )
Returns the number items in all arrays passed to the function. Null parameters are also counted.
Example:
count({1, 2, 3, null})
Returns 4. Null values are not skipped.
JuniorExpressions#sailcoding#function#coding
Loading comments...