# RequestChangeKindCallback Function

> Callback function for requests expecting a ChangeKind value.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Function
- **Path:** DS Server > Reference > JavaScript API > RequestChangeKindCallback Function
- **373 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/requestchangekindcallback/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/requestchangekindcallback/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/requestchangekindcallback/llms-full.txt

---

### Description

Callback function for requests expecting a [ChangeKind](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/changekind-enumeration/llms-full.txt) value.

### Syntax

```javascript
function(<ChangeKind> changeKind)
```

### Examples

The following example demonstrates `RequestChangeKindCallback` in a practical document-editing workflow. Callback function for requests expecting a ChangeKind value.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function requestChangeKindCallback(changeKind) {
    console.log("change kind:", changeKind);
}

TXTextControl.textParts.getMainText(function(mainText) {
    const trackedChanges = mainText.trackedChanges;
    trackedChanges.getItem(function(trackedChange) {
        if (!trackedChange) {
            console.warn("No tracked change is available at the current input position.");
            return;
        }
    
        trackedChange.getChangeKind(requestChangeKindCallback, onTxError);
    }, onTxError);
}, onTxError);
```

---

## Nearby

- **Previous:** [RequestCellFormatCallback Function](https://docs.textcontrol.com/ds-server/reference/javascript/requestcellformatcallback/llms-full.txt)
- **Next:** [RequestCheckFormFieldCallback Function](https://docs.textcontrol.com/ds-server/reference/javascript/requestcheckformfieldcallback/llms-full.txt)
