> 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). Agents can also search and read this documentation through its [MCP server](https://docs.does.qa/~gitbook/mcp).

# Replace Value

Find and replace inside a value store item.

Replace Value searches text inside a [Value Store](https://docs.does.qa/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://static.does.qa/assets/nodes/data_process_replace.png)

## When to use it

* Strip a prefix or suffix from an order ID stored by [Store element text](https://docs.does.qa/test-steps/data/store-element-text.md).
* Replace a placeholder token with a runtime [Value](https://docs.does.qa/values/value-store.md).
* Chain with [Calculate value](https://docs.does.qa/test-steps/data/calculate-value.md) or [Alias value](https://docs.does.qa/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](https://docs.does.qa/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](https://docs.does.qa/test-step-options/failed-status.md) |

## Related

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

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