|
| 1 | +--- |
| 2 | +title: Tables |
| 3 | +description: Store, query, and manage structured data directly within your workspace |
| 4 | +--- |
| 5 | + |
| 6 | +import { Callout } from 'fumadocs-ui/components/callout' |
| 7 | +import { Image } from '@/components/ui/image' |
| 8 | +import { FAQ } from '@/components/ui/faq' |
| 9 | + |
| 10 | +Tables let you store and manage structured data directly in your workspace. Use them to maintain reference data, collect workflow outputs, or build lightweight databases — all without leaving Sim. |
| 11 | + |
| 12 | +<Image src="/static/tables/tables-overview.png" alt="Tables view showing structured data with typed columns for name, title, company, role, and more" width={800} height={500} /> |
| 13 | + |
| 14 | +Each table has a schema of typed columns, supports filtering and sorting, and is fully accessible through the [Tables API](/docs/en/api-reference/(generated)/tables). |
| 15 | + |
| 16 | +## Creating a Table |
| 17 | + |
| 18 | +1. Open the **Tables** section from your workspace sidebar |
| 19 | +2. Click **New table** |
| 20 | +3. Name your table and start adding columns |
| 21 | + |
| 22 | +Tables start with a single text column. Add more columns by clicking **New column** in the column header area. |
| 23 | + |
| 24 | +## Column Types |
| 25 | + |
| 26 | +Each column has a type that determines how values are stored and validated. |
| 27 | + |
| 28 | +| Type | Description | Example Values | |
| 29 | +|------|-------------|----------------| |
| 30 | +| **Text** | Free-form string | `"Acme Corp"`, `"hello@example.com"` | |
| 31 | +| **Number** | Numeric value | `42`, `3.14`, `-100` | |
| 32 | +| **Boolean** | True or false | `true`, `false` | |
| 33 | +| **Date** | Date value | `2026-03-16` | |
| 34 | +| **JSON** | Structured object or array | `{"key": "value"}`, `[1, 2, 3]` | |
| 35 | + |
| 36 | +<Callout type="info"> |
| 37 | +Column types are enforced on input. For example, typing into a Number column is restricted to digits, dots, and minus signs. Non-numeric values entered via paste are coerced to `0`. |
| 38 | +</Callout> |
| 39 | + |
| 40 | +## Working with Rows |
| 41 | + |
| 42 | +### Adding Rows |
| 43 | + |
| 44 | +- Click **New row** below the last row to append a new row |
| 45 | +- Press **Shift + Enter** while a cell is selected to insert a row below |
| 46 | +- Paste tabular data (from a spreadsheet or TSV) to bulk-create rows |
| 47 | + |
| 48 | +### Editing Cells |
| 49 | + |
| 50 | +Click a cell to select it, then press **Enter**, **F2**, or start typing to edit. Press **Escape** to cancel, or **Tab** to save and move to the next cell. |
| 51 | + |
| 52 | +### Selecting Rows |
| 53 | + |
| 54 | +Click a row's checkbox to select it. Selecting additional checkboxes adds to the selection without clearing previous selections. |
| 55 | + |
| 56 | +| Action | Behavior | |
| 57 | +|--------|----------| |
| 58 | +| Click checkbox | Toggle that row's selection | |
| 59 | +| Shift + click checkbox | Select range from last clicked to current | |
| 60 | +| Click header checkbox | Select all / deselect all | |
| 61 | +| Shift + Space | Toggle row selection from keyboard | |
| 62 | + |
| 63 | +### Deleting Rows |
| 64 | + |
| 65 | +Right-click a selected row (or group of selected rows) and choose **Delete row** from the context menu. |
| 66 | + |
| 67 | +## Filtering and Sorting |
| 68 | + |
| 69 | +Use the toolbar above the table to filter and sort your data. |
| 70 | + |
| 71 | +- **Filter**: Set conditions on any column (e.g., "Name contains Acme"). Multiple filters are combined with AND logic. |
| 72 | +- **Sort**: Order rows by any column, ascending or descending. |
| 73 | + |
| 74 | +Filters and sorts are applied in real time and do not modify the underlying data. |
| 75 | + |
| 76 | +## Keyboard Shortcuts |
| 77 | + |
| 78 | +All shortcuts work when the table is focused and no cell is being edited. |
| 79 | + |
| 80 | +<Callout type="info"> |
| 81 | +**Mod** refers to `Cmd` on macOS and `Ctrl` on Windows/Linux. |
| 82 | +</Callout> |
| 83 | + |
| 84 | +### Navigation |
| 85 | + |
| 86 | +| Shortcut | Action | |
| 87 | +|----------|--------| |
| 88 | +| Arrow keys | Move one cell | |
| 89 | +| `Mod` + Arrow keys | Jump to edge of table | |
| 90 | +| `Tab` / `Shift` + `Tab` | Move to next / previous cell | |
| 91 | +| `Escape` | Clear selection | |
| 92 | + |
| 93 | +### Selection |
| 94 | + |
| 95 | +| Shortcut | Action | |
| 96 | +|----------|--------| |
| 97 | +| `Shift` + Arrow keys | Extend selection by one cell | |
| 98 | +| `Mod` + `Shift` + Arrow keys | Extend selection to edge | |
| 99 | +| `Mod` + `A` | Select all rows | |
| 100 | +| `Shift` + `Space` | Toggle current row selection | |
| 101 | + |
| 102 | +### Editing |
| 103 | + |
| 104 | +| Shortcut | Action | |
| 105 | +|----------|--------| |
| 106 | +| `Enter` or `F2` | Start editing selected cell | |
| 107 | +| `Escape` | Cancel editing | |
| 108 | +| Type any character | Start editing with that character | |
| 109 | +| `Shift` + `Enter` | Insert new row below | |
| 110 | +| `Space` | Expand row details | |
| 111 | + |
| 112 | +### Clipboard |
| 113 | + |
| 114 | +| Shortcut | Action | |
| 115 | +|----------|--------| |
| 116 | +| `Mod` + `C` | Copy selected cells | |
| 117 | +| `Mod` + `X` | Cut selected cells | |
| 118 | +| `Mod` + `V` | Paste | |
| 119 | +| `Delete` / `Backspace` | Clear selected cell contents | |
| 120 | + |
| 121 | +### History |
| 122 | + |
| 123 | +| Shortcut | Action | |
| 124 | +|----------|--------| |
| 125 | +| `Mod` + `Z` | Undo | |
| 126 | +| `Mod` + `Shift` + `Z` | Redo | |
| 127 | +| `Mod` + `Y` | Redo (alternative) | |
| 128 | + |
| 129 | +## Using Tables in Workflows |
| 130 | + |
| 131 | +Tables can be read from and written to within your workflows using the **Table** block. Common patterns include: |
| 132 | + |
| 133 | +- **Lookup**: Query a table for reference data (e.g., pricing rules, customer metadata) |
| 134 | +- **Write-back**: Store workflow outputs in a table for later review or reporting |
| 135 | +- **Iteration**: Process each row in a table as part of a batch workflow |
| 136 | + |
| 137 | +## API Access |
| 138 | + |
| 139 | +Tables are fully accessible through the REST API. You can create, read, update, and delete both tables and rows programmatically. |
| 140 | + |
| 141 | +See the [Tables API Reference](/docs/en/api-reference/(generated)/tables) for endpoints, parameters, and examples. |
| 142 | + |
| 143 | +## Best Practices |
| 144 | + |
| 145 | +- **Use typed columns** to enforce data integrity — prefer Number and Boolean over storing everything as Text |
| 146 | +- **Name columns descriptively** so they are self-documenting when referenced in workflows |
| 147 | +- **Use JSON columns sparingly** — they are flexible but harder to filter and sort against |
| 148 | +- **Leverage the API** for bulk imports rather than manually entering large datasets |
| 149 | + |
| 150 | +<FAQ items={[ |
| 151 | + { question: "Is there a row limit per table?", answer: "Tables are designed for working datasets. For very large datasets (100k+ rows), consider paginating API reads or splitting data across multiple tables." }, |
| 152 | + { question: "Can I import data from a spreadsheet?", answer: "Yes. Copy rows from any spreadsheet application and paste them directly into the table. Column values will be validated against the column types." }, |
| 153 | + { question: "Do tables support formulas?", answer: "Tables store raw data and do not support computed formulas. Use workflow logic (Function block or Agent block) to derive computed values and write them back to the table." }, |
| 154 | + { question: "Can multiple workflows write to the same table?", answer: "Yes. Table writes are atomic at the row level, so multiple workflows can safely write to the same table concurrently." }, |
| 155 | + { question: "How do I reference a table from a workflow?", answer: "Use the Table block in your workflow. Select the target table from the dropdown, choose an operation (read, write, update), and configure the parameters." }, |
| 156 | + { question: "Are tables shared across workspace members?", answer: "Yes. Tables are workspace-scoped and accessible to all members with appropriate permissions." }, |
| 157 | + { question: "Can I undo changes?", answer: "In the table editor, Cmd/Ctrl+Z undoes recent cell edits, row insertions, and row deletions. API-driven changes are not covered by the editor's undo history." }, |
| 158 | +]} /> |
0 commit comments