Update Rows

If a single row or multiple rows are to be updated with one or more column values in a table, the following method is used. The table used in the below code snippet is the table object.

Note :The promise returned here will be resolved to an object in which the content key contains an array of updated row details.
    
copy
//Create an object with the details to be updated referring to the corresponding ROWID var details = [ { "Name": "John Denver", "Age": 25, "ROWID": 1510000000085482}, { "Name": "Jill Scott", "Age": 39, "ROWID": 1510000000113707} ]; //Update The Row Object using details var datastore = catalyst.table; var table = datastore.tableId('SampleTable'); var updatePromise = table.updateRow(details); updatePromise .then((response) => { console.log(response.content); }) .catch((err) => { console.log(err); });

A sample response that you will receive is shown below. The response is the same for both versions.

Web SDK

    
copy
[ { CREATORID: "2136000000006003", MODIFIEDTIME: "2021-08-24 13:22:14:718", CREATEDTIME: "2021-08-24 13:12:55:999", Name: "John Denver", Age: 25 ROWID: "2136000000034043" }, { CREATORID: "2136000000006003", MODIFIEDTIME: "2021-08-24 13:22:14:728", CREATEDTIME: "2021-08-24 13:12:56:001", Name: "Jill Scott", Age: 39 ROWID: "2136000000034045" } ]

Last Updated 2023-11-14 13:20:49 +0530 +0530

ON THIS PAGE