# Javascript: Table.getID Method

> Gets the table's identifier.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: Table.getID Method
- **384 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/getid-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/getid-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/getid-method/llms-full.txt

---

### Description

Gets the table's identifier.

### Syntax

```javascript
<void> Table.getID(<RequestNumberCallback> callback)
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the identifier as parameter. |

### Examples

The following example demonstrates `Table.getID` in a practical document-editing workflow. It gets the table's identifier.

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

TXTextControl.textParts.getMainText(function(mainText) {
    const tables = mainText.tables;
    tables.getItem(function(table) {
        if (!table) {
            console.warn("No table is available at the current input position.");
            return;
        }
    
        table.getID(
            function(result) {
                console.log("get id result:", result);
            }
        );
    }, onTxError);
}, onTxError);
```

---

## Nearby

- **Previous:** [Javascript: Table.getDescriptiveText Method](https://docs.textcontrol.com/ds-server/reference/javascript/table/getdescriptivetext-method/llms-full.txt)
- **Next:** [Javascript: Table.getNestedLevel Method](https://docs.textcontrol.com/ds-server/reference/javascript/table/getnestedlevel-method/llms-full.txt)
