> For the complete documentation index, see [llms.txt](https://help.workdigital.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.workdigital.io/custom-database-apps/formula-functions/text-functions.md).

# Text Functions

| Name    | Catergory      | Arguments                                             | Result                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Examples                                                                 |
| ------- | -------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| Chr     | Text Functions | <p>NUMBER </p><p>ascii\_code</p>                      | TEXT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Returns a one-character text value containing the character specified by ascii.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Chr(65) will return “A”                                                  |
| ConCats | Text Functions |                                                       | TEXT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Returns the merged text value of all the arguments.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | ConCat(“abc”,”def”,”ghi”) returns “abcdefghi”                            |
| LTrim   | Text Functions | TEXT text, \[TEXT character\_mask]                    | TEXT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Strip whitespace (or other characters) from the beginning of a text value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | LTrim(” abc “) will return “abc “ LTrim(“–abc—“, “-“) will return “abc—“ |
| Num     | Text Functions | TEXT text                                             | NUMBER                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Converts a text value to number if the text value contains only numeric characters and a decimal point.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Num(“8950”) will return 8950 in numeric form                             |
| RTrim   | Text Functions | TEXT text, \[TEXT character\_mask]                    | TEXT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Strip whitespace (or other characters) from the end of a text value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | RTrim(” abc “) will return ” abc” RTrim(“–abc—“, “-“) will return “–abc” |
| Str     | Text Functions | DATABASE\_FIELD/MIXED variable                        | TEXT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Returns text value of a variable.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Str(“12345”) returns “12345” in text form                                |
| StrLen  | Text Functions | TEXT\_FIELD/TEXT text                                 | NUMBER                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Returns the length of the given text value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | StrLen(“Hello World”) returns 11                                         |
| SubStr  | Text Functions | TEXT\_FIELD/TEXT text, NUMBER start, \[NUMBER length] | <p> Returns the portion of text value specified by the start and<br>length parameters.</p><p><strong>TEXT\_FIELD/TEXT text</strong><br>The input text value. Must be<br>one character or longer.</p><p><strong>INTEGER start</strong><br>If start is non-negative, the<br>returned text value will start at the start’th position in text value, counting from<br>zero. For instance, in the text value ‘abcdef’, the character at position 0 is ‘a’, the<br>character at position 2 is ‘c’, and so forth.</p><p>If start is negative, the returned<br>text value will start at the start’th character from the end of text value.</p> | <p>If<br>text value is less than start characters long, FALSE will be returned.</p><p><strong>INTEGER</strong><br><strong>length</strong><br>If length is given and is positive, the text value returned will<br>contain at most length characters beginning from start (depending on the length of text<br>value).</p><p>If length is given and is negative, then that many characters will be<br>omitted from the end of text value (after the start position has been calculated when a<br>start is negative). If start denotes the position of this truncation or beyond, FALSE<br>will be returned.</p><p>If length is given and is 0, FALSE or NULL, an empty text value<br>will be returned.</p><p>If length is omitted, the substring starting from start until<br>the end of the text value will be returned.</p> |                                                                          |
| Trim    | Text Functions | TEXT text, \[TEXT character\_mask]                    | TEXT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Strip whitespace (or other characters) from the beginning and end of a text value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Trim(” abc “) will return “abc” Trim(“—abc–“, “-“) will return “abc”     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.workdigital.io/custom-database-apps/formula-functions/text-functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
