> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# LEFT

> The LEFT function returns a specified number of characters from the beginning of a text string. Use it in YiDA forms, workflow design, integration & automation, and other scenarios, including validation rules and association actions.

The **LEFT** function returns a specified number of characters starting from the first character of a text string. If the text is shorter than the specified length, the original text is returned.

## Supported Scenarios

The LEFT function is supported in the following YiDA scenarios:

* Form (main table fields)
* Form (business association rules)
* Form (validation)
* Workflow design (validation rules)
* Workflow design (association actions)
* Integration & automation
* Workflow node
* Connector

## Syntax

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
LEFT(text, num_chars)
```

## Attributes

| **Attribute** | **Required** | **Description**                                                                                                         |
| ------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------- |
| text          | Yes          | The text from which to extract characters on the left.                                                                  |
| num\_chars    | Yes          | The number of characters to extract. If this value exceeds the total length of the text, the original text is returned. |

## Return Value

| **Return type** | **Description**                                                  |
| --------------- | ---------------------------------------------------------------- |
| Text            | The specified number of characters, returned from left to right. |

## Example

The formula in the image below returns: `YiDA`.

## Try It

Return the characters from the first to the second position of the input field component value.
