Your Setup:
- Environment: SeaTable Cloud (Free Edition)
- SeaTable Version: Latest Cloud Version
Describe the Problem:
I am trying to automate linking rows between two tables (youtube and stories) based on a matching text column id_day. Despite the script executing without errors and the API returning a success status, the “Link to other records” column remains empty in the UI even after a hard refresh (F5).
The Logic:
The script finds all rows in stories where id_day matches the id_day in the youtube table. It then attempts to write an array of the stories’ _id strings into the link column.
Troubleshooting already performed:
- Column Type: Verified as “Link to other records” (NOT a Link Formula).
- Permissions: I am the base owner; no column-level permissions are set.
- Manual Link: Linking rows manually via the UI works perfectly.
- API Methods: Tried
base.updateRow,base.modifyRow, andbase.addLink. - Internal Keys: Used the internal column key (
hsUk) instead of the display name. - Data Integrity: Verified that
id_dayvalues are clean strings and row IDs are valid. - New Column: Created a brand new link column to rule out metadata corruption — same result.
The console log confirms that the script correctly identifies the rows and the number of IDs to be linked, but the database doesn’t seem to “commit” the changes.
Commands Executed:
// Example of the core logic used
const YOUTUBE_TABLE = 'youtube';
const STORIES_TABLE = 'stories';
const COLUMN_KEY = 'hsUk'; // Internal key for 'link_stories'
async function sync() {
const ytTable = base.getTableByName(YOUTUBE_TABLE);
const stTable = base.getTableByName(STORIES_TABLE);
// Example of a single row update attempt
const rowId = "A7x..."; // Valid Row ID
const storyIds = ["JiR...", "C8O..."]; // Valid Story _ids
try {
// The API returns 'undefined' (Success), but no data is saved
await base.modifyRow(ytTable, rowId, { [COLUMN_KEY]: storyIds });
} catch (e) {
console.error("Error:", e.message);
}
}