Task References

On this page:

length (string)


The length (string) task counts the number of characters in a given string and returns the count.

Note: The length of an empty string is 0 (zero).

Potential Use Case

This task can be used to specify the maximum number of characters allowed for a string property. Let's say you need to verify that a user provided exactly 3 characters (e.g., "ATL", "HNL", "LHR") for an airport code on an entry form. Using length (string) would provide the character count in the user provided string, with additional logic applied elsewhere in the workflow to compare that count to the acceptable character count value in the database.


Incoming Type Description
str String Required. The string to get the length of using a character count.

Outgoing Type Description
length Number The number of characters counted in the str variable. The count includes spaces, alpha-numeric values, and any other special characters.


In this IAP example:

  • The str variable has been statically coded as 12 Dollars And 43 Cents.

  • The outgoing length value will be 23, which represents the number of characters that were counted.