Issue with Updating a Cell Using SeaTable Scripting API

Setup:

selfhosted, enterprise

I am trying to update a text column in my SeaTable base using the scripting API, but the changes do not reflect in the table. Here’s what I have tried:

  1. Fetching rows successfully – I can retrieve the correct row and confirm that the row ID and column names are correct.
  2. Checking column names – I verified the actual column key using base.getTableByName("Company") and listed all columns.
  3. Using modifyRow() or updateRow() – I attempted both functions but received undefined as a response, and no changes appeared in the table.
  4. Ensuring the column is writable – The column is a standard text field.
  5. No error is thrown, but nothing updates.
    The response from modifyRow() is undefined.

Questions:
What is the correct method to update a row’s field in a script?
Are there any known limitations when using modifyRow() or updateRow()?

(async function updateRow() {
    const table = base.getTableByName("Company");
    const firstRow = table.rows[0];  // Fetch first row
    const rowId = firstRow._id;
    
    let updateData = { "WTI6": "TEST_VALUE" };

    try {
        const response = await base.modifyRow(table, rowId, updateData);
        alert(`✅ ModifyRow Response: ${JSON.stringify(response)}`);
    } catch (error) {
        console.error("❌ ERROR:", error);
        alert(`❌ ERROR: ${error.message}`);
    }
})();

In updateRow / modifyRow, the row is updated by matching the field names with the corresponding updates: { [column.name]: “xxx” }. Additionally, the operation of modifying row(s) does not return a value.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.