# Javascript: TXTextControl.AddResult Enumeration

> Specifies the result when a subtextpart has been added to the document. The object has the following properties:

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Enumeration
- **Introduced:** 26.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.AddResult Enumeration
- **408 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/addresult-enumeration/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/addresult-enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/addresult-enumeration/llms-full.txt

---

### Description

Specifies the result when a subtextpart has been added to the document. The object has the following properties:

### Members

| Member | Description |
|---|---|
| Error | An unexpected error has occurred. |
| Successful | The subtextpart has successfully been inserted. |
| NoSelection | The subtextpart wasn't inserted because there is no selection. |
| SelectionTooComplex | The subtextpart wasn't inserted because the selection is too complex. It is not a continuous sequence of characters. |
| PositionInvalid | The subtextpart wasn't inserted because the specified position values are invalid. Invalid start and / or length values have been specified. |
| AlreadyExists | The subtextpart wasn't inserted because it already exists. |
| Overlapping | The subtextpart wasn't inserted because it overlaps with an existing textpart. |
| Combined | The subtextpart was inserted and combined with an existing one. A subtextpart is combined with an existing one, when it immediately follows it and has the same name and id. |

### Examples

The following example uses `TXTextControl.AddResult.Error` (an unexpected error has occurred.) in a document-editing workflow.

```javascript
const value = TXTextControl.AddResult.Error;
console.log("An unexpected error has occurred.", value);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.addMergeField Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/addmergefield-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.addTextField Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/addtextfield-method/llms-full.txt)
