> For the complete documentation index, see [llms.txt](https://docs.does.qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.does.qa/test-steps/data/replace-value.md).

# Replace Value

Replace Value searches text inside a [Value Store](/values/value-store.md) entry and writes the result to a new storage name. Use it to trim, normalise, or reshape captured data before later steps read it.

![Replace value Test Step](https://app.does.qa/screenshots/node/data_process_replace.png)

## When to use it

* Strip a prefix or suffix from an order ID stored by [Store element text](/test-steps/data/store-element-text.md).
* Replace a placeholder token with a runtime [Value](/values/value-store.md).
* Chain with [Calculate value](/test-steps/data/calculate-value.md) or [Alias value](/test-steps/data/alias-value.md) when the Flow needs several transforms in sequence.

## Configure

### Basics

| Field                   | What to set                                                    |
| ----------------------- | -------------------------------------------------------------- |
| **Input Value**         | Source text and/or a [Value](/values/value-store.md) to search |
| **Replace**             | Haystack and needle pair defining what to find                 |
| **Replacement Mode**    | `First Match` (default) or `All Matches`                       |
| **Output Storage Name** | Name for the transformed result in the Value Store             |

### Advanced

| Field              | What to set                                          |
| ------------------ | ---------------------------------------------------- |
| **Status on fail** | [Failed Status](/test-step-options/failed-status.md) |

## Related

* [Set value](/test-steps/data/set-value.md)
* [Alias value](/test-steps/data/alias-value.md)
* [Calculate value](/test-steps/data/calculate-value.md)
* [Value Store](/values/value-store.md)
* [Data](/test-steps/data.md)

**Tags:** `data`, `process`, `replace`, `find`, `convert`, `edit`
