---
title: "Get Text Length Step"
url: "https://docs.robotiq.ai/en/article/get-text-length-step"
language: "en"
last_updated: "2025-12-24T14:21:39.021Z"
---

# Get Text Length Step

The Get Text Length step counts the number of characters in a text variable. It saves this count as a whole number in another variable.

Use this step when you need to know how long a piece of text is for checking information, formatting, or other process rules.

## How to Use Get Text Length

This step takes a text variable and gives you back its character count.

### Step 1: Add the Get Text Length Step

1.  Open your process in the Robotiq.ai Process Editor.
2.  Drag and drop the **Get Text Length** step into your workflow.

### Step 2: Set up the Step

1.  In the step's properties panel, find the **Source text variable** field.
2.  Type the name of the text variable you want to measure.
3.  In the **Destination variable with text length** field, type the name of a new or existing whole number variable. The character count will go here.

**Example:** If `myString` says "Hello World", the destination variable will hold `11`.

## What the Settings Mean

**Step Name** (Optional)

-   A custom name for this step in your process.
-   **Example:** `Get_User_Input_Length`
-   Use this to make your process easier to understand.

**Source text variable** (Required)

-   The name of a variable that holds the text you want to count.
-   This variable must be a text type.
-   **Example:** `userInputText`
-   You might get this text from a [String Input Step](https://docs.robotiq.ai/en/article/string-input-step) or a [Set Variable Value Step](https://docs.robotiq.ai/en/article/set-variable-value-step).

**Destination variable with text length** (Required)

-   The name of the variable where the character count will be saved.
-   This variable will be a whole number type.
-   You can use a whole number variable you already have or make a new one by typing a new name.
-   **Example:** `textLength`
-   You can then use this whole number variable in other steps, like a [Switch Step](https://docs.robotiq.ai/en/article/switch-step) for making decisions.

## Related Articles

-   [Define Variable Step](https://docs.robotiq.ai/en/article/define-variable-step) - Learn how to create new variables.
-   [Get Subtext Step](https://docs.robotiq.ai/en/article/get-subtext-step) - Pull out a part of a text string.
-   [Pad Text Step](https://docs.robotiq.ai/en/article/pad-text-step) - Add characters to the front or back of a text string.

## Need Help?

Can't find what you're looking for? Join the [Robotiq Community](https://community.robotiq.ai/home/) to get help from other users and the Robotiq team.

![](https://cdn-assets.productfruits.com/e54e42c4-a470-4877-90cb-70a03c6a27d2)
