> For the complete documentation index, see [llms.txt](https://docs.avoautomation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avoautomation.com/avo-assure/actions/generic/string-operations/left.md).

# Left

This is a pre-built Action located under the **@Generic Element**. The functionality of this Action in Avo Assure is to extract characters from the left side of the given text, starting from the specified position. The extracted text is stored in a dynamic variable.

## **Syntax**

**Input Value**: `<string>;<position to fetch the string from left>`&#x20;

| Argument                                                       | Description                                                                                                                                                                                 |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>\<string ></p><p>(Required)</p>                             | Provide the sequence of characters from which a specific portion needs to be fetched from the left side.                                                                                    |
| <p>\<position to fetch the string from left><br>(Required)</p> | <p>Provide the count of characters to extract from the left side of the given string. Count number must be a positive integer.<br><br><strong>Note</strong>: Index value starts from 1.</p> |

**Output Value**: `<Dynamic Variable>;<Dynamic Variable>(Optional)`

| Argument                                  | Description                                                                 |
| ----------------------------------------- | --------------------------------------------------------------------------- |
| <p>\<Dynamic Variable><br>(Required)</p>  | This dynamic variable holds the leftmost characters of a string.            |
| <p>\<Dynamic Variable><br>(Optional) </p> | This dynamic variable stores the operation status as **True** or **False**. |

### **Example: Extracting Characters from the Left Side of a String**

In this example, we explain how to extract a specific number of characters from the beginning of a string.

* **Action**: Left
* **Input Value**: Automation;3
  * The first argument (**Automation**) specifies the main string,&#x20;
  * The second argument (**3**) specifies the count that determines how many characters to extract from the given string.
* **Output Value**: {Left String}
  * The extracted substring (Aut) is stored in this **{Left String}** dynamic variable for further use.
  * If the second output variable is defined, it stores the action status with the following possible values:
    * **True**: If the substring is successfully extracted.
    * **False**: If the extraction fails due to invalid input or configuration.
* **Logical Explanation**: The **Left** action fetches the string from the **Input Value** column (**Automation;3**) and extracts the 3 characters of the string from left. The resulting substring (Aut) is stored in the **{Left String}** variable.

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

#### **Knowledge Bites:**&#x20;

Here are some examples of different string scenarios:

| String               | Input Value         | Result   |
| -------------------- | ------------------- | -------- |
| Text Strings         | Software Enginner;3 | Sof      |
| Numeric Strings      | 123456;4            | 1234     |
| Special Character    | <abc@domain.com>;7  | abc\@dom |
| Alphanumeric strings | ID2025;2            | ID       |


---

# 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://docs.avoautomation.com/avo-assure/actions/generic/string-operations/left.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.
