Skip to content

items.BulkDelete

Overview

Delete all records from a specified site at once. You can specify selection conditions to narrow down the records to be deleted.

Syntax

items.BulkDelete(siteId, view)

Parameters

Parameter Type Required Description
siteId object Yes Specify the site ID of the target table.
view string Yes Specify the conditions for the records to be selected.

Return Value

Returns the number of records deleted by the bulk delete. If no records could be deleted, 0 is returned.

Usage Examples

The following example deletes records with a Status of 900 (completed) from the table with site ID 123.

JavaScript
let view = {
    "View": {
        "ColumnFilterHash": {
            "Status": "[\"900\"]"
        }
    }
};
items.BulkDelete(123, JSON.stringify(view));

Usage Example 2

The following example deletes the records with record IDs 1000, 1003, and 1400 from the table with site ID 123.

JavaScript
let data = {
    Selected: [1000,1003,1400]
};
items.BulkDelete(123, JSON.stringify(data));

Usage Example 3

The following example deletes all records from the table with site ID 123.

JavaScript
let data = {
    All: true
};
items.BulkDelete(123, JSON.stringify(data));

Cautions

This is a method used in "Server Script". It cannot be used in "Script".