Links¶
Get Links¶
getLinkedRecords
List the linked records of rows. You can get the linked records of multiple rows.
- table_id: the id of link table
- link_column_key: the column key of the link column of link table ( not link_id )
- rows: a list, each item of the which contains a row info including row_id, offset (defualt by 0) and limit (default by 10) of link table
Example
base.getLinkedRecords('0000', '89o4', [
{'row_id': 'FzNqJxVUT8KrRjewBkPp8Q', 'limit': 2, 'offset': 0},
{'row_id': 'Jmnrkn6TQdyRg1KmOM4zZg', 'limit': 20}
])
// a key-value data structure returned as below
// key: row_id of link table
// value: a list which includes the row info of linked table
{
'FzNqJxVUT8KrRjewBkPp8Q': [
{'row_id': 'LocPgVvsRm6bmnzjFDP9bA', 'display_value': '1'},
{'row_id': 'OA6x7CYoRuyc2pT52Znfmw', 'display_value': '3'},
...
],
'Jmnrkn6TQdyRg1KmOM4zZg': [
{'row_id': 'LocPgVvsRm6bmnzjFDP9bA', 'display_value': '1'},
{'row_id': 'OA6x7CYoRuyc2pT52Znfmw', 'display_value': '3'},
...
]
}
Get Link ID¶
getColumnLinkId
Get the link id by column name.
Example
Add Links¶
addLink
Add link, link other table records. Get more information about linking columns from the SeaTable API Reference.
Example
Remove Links¶
removeLink
Delete the link row.
Example
Update Links¶
updateLinks
Remove all existing row links and add new links.
Example