# Custom string transform function

## Introduction

The **custom string** transform function is used to map a given string to a target field. This string can be static, or you can reference [flow variables](/product-documentation/process-flows/building-process-flows/dynamic-variables/flow-variables/referencing-flow-and-meta-variables-in-mapping-transformations.md) and [cached data](/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/cache/referencing-a-cache-in-mapping-transformations.md).

{% hint style="info" %}
If you've added/updated a [map shape](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/map-shape.md) before, you'll be used to selecting a **source** field and a **target** field. However, when a **custom string** transformation is used we don't select a **source** field - the **custom string** transformation is our data source.
{% endhint %}

## Adding a custom string transform

**Step 1**\
In your process flow, access settings for your map shape:

<div align="left"><figure><img src="/files/2J95JghF60t6Ewxifg9X" alt="" width="261"><figcaption></figcaption></figure></div>

**Step 2**\
Select the **add transform** button for the required mapping rule - for example:

<div align="left"><figure><img src="/files/arnk2WLETctmf5F9QLWV" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 3**\
Click the **add transform** button:

<div align="left"><figure><img src="/files/yFdk7J6MVBdUQAj84VxH" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 4**\
Click in the **name** field to access a list of all available transform functions, then select **custom string**:

<div align="left"><figure><img src="/files/WR60eMNSuD0k9nTuw3AC" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 5**\
Move down to the **custom string** field and enter your required text or variables - for example:

<div align="left"><figure><img src="/files/9rtPhT8zAPT35MAQSYAI" alt="" width="375"><figcaption></figcaption></figure></div>

{% hint style="info" %}
For more information about referencing flow variables in a custom string, please see our [Referencing flow variables in field mapping transformations](/product-documentation/process-flows/building-process-flows/dynamic-variables/flow-variables/referencing-flow-and-meta-variables-in-mapping-transformations.md) page. For more information about referencing cached data in a custom string, please see our [Referencing a cache in mapping transformations](/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/cache/referencing-a-cache-in-mapping-transformations.md) page.
{% endhint %}

**Step 6**\
Accept your changes:

<div align="left"><figure><img src="/files/ozUxZuwLTsAGNvDd5dCO" alt="" width="375"><figcaption></figcaption></figure></div>

...then save the transformation:

<div align="left"><figure><img src="/files/ExGJ6x9kBDyy6mCylopj" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 7**\
Now you can select a target field in the usual way - for example:

<div align="left"><figure><img src="/files/c6VznFxuwY33AscoIEf5" alt="" width="375"><figcaption></figcaption></figure></div>

...then:

<div align="left"><figure><img src="/files/3AZQ9HnxqyHxzNyxRl7O" alt="" width="375"><figcaption></figcaption></figure></div>

...then:

<div align="left"><figure><img src="/files/11M85v8PgEl4UI5TgRsd" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 8**\
Once your mapping is complete, the row should be displayed without a source field - for example:

<div align="left"><figure><img src="/files/g1AGZ26uTRCA0p5qddsY" alt="" width="375"><figcaption></figcaption></figure></div>

From here you can save changes or add more mapping rules as needed. Next time the process flow runs, the **custom string** (or associated values from variables) will be mapped to the given target field.


---

# 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://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/map-shape/working-with-field-transformations/available-transform-functions/string-transform-functions/custom-string-transform-function.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.
