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:
- Fetching rows successfully – I can retrieve the correct row and confirm that the row ID and column names are correct.
- Checking column names – I verified the actual column key using
base.getTableByName("Company")
and listed all columns. - Using
modifyRow()
orupdateRow()
– I attempted both functions but receivedundefined
as a response, and no changes appeared in the table. - Ensuring the column is writable – The column is a standard text field.
- No error is thrown, but nothing updates.
The response frommodifyRow()
isundefined
.
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}`);
}
})();