> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# REPLACE

> The REPLACE function replaces part of a text string with a new text string, based on a specified number of characters. It is supported across various YiDA scenarios, including Form, workflow design, and integration & automation.

The **REPLACE** function replaces part of a text string with a new text string, based on a specified number of characters.

## Supported Product Scenarios

The REPLACE function is supported in the following YiDA scenarios:

* Form (main table field)
* Form (business association rule)
* Form (validation)
* Workflow design (validation rule)
* Workflow design (association action)
* Integration & automation
* Workflow node
* Connector

## Format

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
REPLACE(oldtext, startnum, numchars, newtext)
```

## Attribute Description

| **Attribute** | **Required** | **Description**                                                         |
| ------------- | ------------ | ----------------------------------------------------------------------- |
| oldtext       | Yes          | The text in which characters are replaced.                              |
| startnum      | Yes          | The starting position of the characters to replace within the old text. |
| numchars      | Yes          | The number of characters to replace in the old text.                    |
| newtext       | Yes          | The content used to replace the characters in the old text.             |

## Return Value

| **Return type** | **Description**                         |
| --------------- | --------------------------------------- |
| Text            | The new text content after replacement. |

## Example

The formula in the figure below returns: `YiDA app development platform`.

## Try It Out

Replace part of a text string with a different text string, based on a specified number of characters.
