DS Server

TableBaseCollection Object

Object|Introduced in 28.0

Description

The base class for table collections.

Syntax

TableBaseCollection

Examples

The following example demonstrates TableBaseCollection in a practical document-editing workflow. The base class for table collections.

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

function inspectTableBaseCollection(tableBases) {
    tableBases.getItem(
        function(table) {
            if (!table) {
                console.warn("No table was returned.");
                return;
            }
            
            console.log("get item result:", table);
        },
        onTxError,
        25
    );
}

Members

Methods

MethodDescription
elementAtReturns the element at a specified index in the collection. (Inherited from Collection.)
forEachExecutes a callback function for each element. (Inherited from Collection.)
getCountGets the number of elements contained in the collection. (Inherited from Collection.)
getItemGets the first table in the collection with the given id.
removeAtInputPositionRemoves the table at the current input position.
removeByIdRemoves the first table with the passed id.