# Rule action: Calculate length

**Used for:** calculating the number of characters in a field.\
**Used in:** "THEN"-statements and "ELSE"-statements.

Sometimes you need to know how long the content in a certain field is for your products. The calculate length rule calculates the number of characters in the field you choose. For example, you could calculate how long the title of every product is with the following rule:

<figure><img src="/files/c474d7b64f346cea4d54e4bee178410ca12a02e4" alt=""><figcaption></figcaption></figure>

This would result in the following output:

<figure><img src="/files/1437ba64ce7046c1e59190a2ef9ae330f3e4cdd3" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helpcenter.channable.com/manage-improve-product-data/rules-bulk-edit-and-enrich/how-to-use-actions-then-in-rules/rule-action-calculate-length.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
