length (string)
  • 23 May 2023
  • Dark
    Light
  • PDF

length (string)

  • Dark
    Light
  • PDF

Article summary

length (string) Task Purpose

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.

Properties

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.

Example

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.

    stringLength-01


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.