# Concatenate

This is a pre-built Action located under the **@Generic Element**. The functionality of this Action in Avo Assure is to merge two or more strings provided in the input value into one complete string. The merged result is stored in a dynamic variable.

## **Syntax**

**Input Value**: `<string1>;<string2>;…;<stringN>`&#x20;

| Argument                                                   | Description                                                      |
| ---------------------------------------------------------- | ---------------------------------------------------------------- |
| <p>\<string1>;\<string2;>;...;\<stringN><br>(Required)</p> | Provide two or more input strings, separated by a semicolon (;). |

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

| Argument                                     | Description                                               |
| -------------------------------------------- | --------------------------------------------------------- |
| <p>\<Dynamic Variable></p><p>(Required)</p>  | This variable holds the combined value.                   |
| <p>\<Dynamic Variable></p><p>(Optional) </p> | This variable stores the status as **True** or **False.** |

### **Example 1: Concatenating Two Strings Without Space**

In this example, we explain how to combine multiple strings into one without adding spaces.

* **Action**: Concatenate
* **Input Value**: John;Doe
  * The first argument (**John**) represents the First Name.
  * The second argument (**Doe**) represents the Last Name. Both strings are combined without any space.
* **Output Value**: {Combined value}
  * The concatenated result (JohnDoe) is stored in this **{Combined value}** 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 concatenation is successful.
    * **False**: If the concatenation fails because one or both input values are missing or invalid.
* **Logical Explanation**: The **Concatenate** action fetches the values from the **Input Value** column (**John;Doe**), where the First Name is (John) and the Last Name is (Doe). It combines them into a single string (JohnDoe). The combined string is stored in the **{Combined value}** variable.

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

### **Example 2:** Concatenating Two Strings with a Space

In this example, we explain how to combine multiple strings with a space.

* **Action**: Concatenate
* **Input Value**: John; Doe
  * The first argument (**John**) specifies the first string.
  * The third argument (  **Doe**) specifies the second string, which includes a leading space because it appears after the semicolon in the input.

{% hint style="info" %}
**Note**: Concatenate does not add spaces on its own and it simply joins the strings exactly as they are provided.\
Because the space is part of the second string
{% endhint %}

* **Output Value**: {Combined value}
  * The concatenated string (John Doe) is stored in this **{Combined value}** dynamic variable for further use.
  * If the second output variable is defined, it stores the operation status with the following possible values:
    * **True**: If the concatenation is successful.
    * **False**: If the concatenation fails because one or both input values are missing or invalid.
* **Logical Explanation**: The **Concatenate** action fetches the value from the **Input Value** column (**John; Doe**). The first string is (John), and the second string is ( Doe). A space already exists before “Doe” in the input value, and this space becomes part of the second string. The final combined result becomes (John Doe). The action stores the combined string in the **{Combined value}** dynamic variable.

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

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

Here are some examples of different string scenarios:

| String               | Input Value           | Result              |
| -------------------- | --------------------- | ------------------- |
| Text Strings         | Database; Auto;mation | Database Automation |
| Numeric Strings      | 123;456               | 123456              |
| Special Character    | abc\@do;main.com      | <abc@domain.com>    |
| Alphanumeric strings | ID8765;4              | ID87654             |


---

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