Length

Length functions allow you to work out how long a text value is, either regarding how many characters it contains, or how many items there are in a list (if it's an array).

This is useful if you want to validate the format of expected values e.g. barcodes, or correctly Slice values apart at specified points.

See also General > Count.

Excel

=~LEN!~(‹cell›)

=LEN(A1) // "ava.wilkins@company.org" -> 23

Tableau

~LEN!~(‹string›)

LEN([Email Address]) // "ava.wilkins@company.org" -> 23

Alteryx

~LEN!~(‹string›)

LEN([Email Address]) // "ava.wilkins@company.org" -> 23

OrgVue

‹dimension›.value.~length!~ OR ‹array›.~length!~

node.emailaddress.value.length 
// "ava.wilkins@company.org" -> 23
// OR
node.c.length // counts the number of items in the array of node.c (ie span of control)

tSQL

~LEN!~(‹field›)

SELECT LEN(EmailAddress) AS EmailLength
FROM EmployeesData

Python

~len!~(‹string›) OR ~len!~(‹array›)

len(emailAddress) # "ava.wilkins@company.org" -> 23
# OR
len(children) # counts the number of items in the array 'children'

NB. The above example assumes variables have been declared for emailAddress and children . For more information, go to General > Variables.

Last updated

Was this helpful?