link_widgets
Set up master-detail linking between two widgets on the same Grist page so selecting a source record filters the target widget to related records.
Instructions
Set up master-detail linking between two widgets on the same page. When a record is selected in the source widget, the target widget filters to show related records.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"page_name": "<page_name>",
"source_widget": "<source_widget>",
"target_widget": "<target_widget>"
},
"name": "link_widgets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | No | Document ID | |
| page_name | Yes | Page containing both widgets | |
| link_column | No | Column name in the target table for reference-based linking (e.g. a Ref:SourceTable column). Omit for cursor-based same-table linking. | |
| source_column | No | Column name in the source table (for non-default linking). Usually not needed — defaults to using the selected row. | |
| source_widget | Yes | Title or table ID of the source (driving) widget | |
| target_widget | Yes | Title or table ID of the target (filtered) widget |