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.
||String||Required. The string to get the length of using a character count.|
||Number||The number of characters counted in the
In this IAP example:
strvariable has been statically coded as
12 Dollars And 43 Cents.
lengthvalue will be
23, which represents the number of characters that were counted.