> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/tables/working-with-tables.md).

# Working with Tables

Comprehensive technical guide to structuring multi-sheet tables, configuring rich column schemas, writing cross-sheet formulas, managing relational lookups, and setting up automation triggers.

## Table & Sheet Architecture

Diaflow Tables employs a **Container Model**: a table acts as a container that holds one or more tabbed **Sheets** (similar to workbook tabs in Excel or Google Sheets).

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FRdqYZK52E6VnDxgXAj19%2Frounded-image%20(15).png?alt=media&amp;token=bda34b9f-f9fe-4a1f-870d-d57a102d98d9" alt=""><figcaption></figcaption></figure>

#### Managing Sheets

* **Add & Rename**: Create new sheets within any table and customize their tab names.
* **Reorder Tabs**: Drag and drop tabs to adjust their display order in the table header.
* **Duplicate Sheet**: Create an exact clone of any sheet with two options:
  * **Structure Only**: Copies column schemas, select options, validations, and formula configurations without copying existing row records.
  * **Structure + Data**: Copies the entire sheet including all rows, attachments, and cell values.
* **Minimum Sheet Rule**: Every table must have at least one sheet. Deleting the last remaining sheet in a table is strictly blocked.

> <mark style="color:red;">**Sheet Deletion is Immediately Permanent**</mark>\
> While deleting an entire table moves it to the Trash (allowing recovery), **deleting a single sheet inside a table is permanently destructive immediately**. Please ensure you have backups or duplicate the sheet before deleting.

***

## Organization: Folders & Lifecycle

### Table Folders

Workspaces with dozens of tables can organize them into dedicated folders:

* **Folder Management**: Create, rename, delete folders, and move tables between folders with drag-and-drop or menu actions.
* **Default Folder**: Every workspace includes an automatically generated **Default Folder** that houses unassigned tables. The Default Folder cannot be renamed or deleted.
* **Live Counter**: The folder sidebar displays a real-time count of active tables inside each folder.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FVbx6RRLazGaHs4p4wXGU%2Frounded-image%20(16).png?alt=media&amp;token=dd1878f1-fe00-486e-94a4-f54ea8c386d6" alt=""><figcaption></figcaption></figure>

### Trash & Restore Lifecycle

Diaflow protects your workspace against accidental data loss with a safe Trash lifecycle:

* **Soft Deletion**: Deleting a table moves it to **Trash** rather than permanently destroying it. All sheets, columns, and row data remain fully preserved.
* **Locked State**: A trashed table is locked in a read-only state. No edits, imports, or action triggers can occur while it resides in Trash.
* **Restoring a Table**:
  * Tables can be restored individually or all at once.
  * Restoring returns the table to its original folder. If the original folder was deleted in the interim, the table is automatically moved to the **Default Folder**.
* **Permanent Purge**: Users can permanently delete (purge) tables from Trash. Once purged, data cannot be recovered.
* **Deleting a Folder**: Deleting a folder automatically moves all of its tables to Trash. It does not delete them permanently.

> <mark style="color:red;">**Automation Behavior with Trashed Tables**</mark>\
> When a table is moved to Trash, any active row triggers or automations linked to that table are automatically **paused**. Upon restoration, automations will resume **only if** the underlying Flow remains active and published.

***

## Supported Column Types

Diaflow Tables supports a broad set of field types tailored for business operations:

| Column Type            | Description                                   | Key Features & Behavior                                                |
| ---------------------- | --------------------------------------------- | ---------------------------------------------------------------------- |
| **Text**               | Single-line or multi-line plain text          | Searchable, supports quick-filter and sorting.                         |
| **Number**             | Integer or decimal numeric values             | Configurable precision; compatible with footer math aggregations.      |
| **Date / Time**        | Calendar dates and timestamps                 | Date picker, timezone-aware formatting.                                |
| **Select**             | Single-select and Multi-select dropdown chips | Customizable chip colors for visual categorization (status, priority). |
| **Assignee**           | Team member assignment                        | Selects active workspace members; ideal for task dispatching.          |
| **Attachment**         | File uploads per cell                         | Upload documents, images, and receipts directly to a row.              |
| **Created Time**       | Automatic creation timestamp                  | Read-only; auto-populated when the row is first created.               |
| **Last Modified Time** | Automatic update timestamp                    | Read-only; auto-refreshed whenever any cell in the row changes.        |
| **Formula**            | Excel/Airtable-style computed fields          | Dynamic calculations across columns and sheets.                        |
| **Link to Sheet**      | Relational link to another sheet              | Connects records across different sheets in your workspace.            |
| **Lookup**             | Synced value from a linked record             | Automatically pulls data from a linked sheet based on the relation.    |
| **Action**             | Interactive button inside cells               | Triggers a Diaflow Flow or third-party app with row data as payload.   |

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FiY80I80LIGbIiq54SnXR%2Frounded-image%20(17).png?alt=media&amp;token=a5712d00-0e02-4fbd-8bd3-f37200aaa5c7" alt=""><figcaption></figcaption></figure>

***

## Formulas & Cross-Sheet References

Diaflow Tables includes an **Excel/Airtable style Formula Engine** that computes values dynamically:

* **Comprehensive Function Library**:
  * **Math**: `SUM`, `AVERAGE`, `ROUND`, `ABS`, `POWER`, `MOD`, etc.
  * **Text**: `CONCAT`, `LOWER`, `UPPER`, `TRIM`, `SPLIT`, `SUBSTITUTE`, etc.
  * **Regex**: Extract patterns or validate formatted strings (e.g., emails, phone numbers).
  * **Date/Time**: `TODAY()`, `NOW()`, `DATEADD()`, `DATEDIFF()`, `FORMAT_DATE()`, etc.
  * **Logic**: `IF()`, `AND()`, `OR()`, `NOT()`, `SWITCH()`.
  * **Array**: Functions for operating on lists and lookup sets.
* **Cross-Sheet References**: Formulas can reference columns residing on other sheets within the same table container.
* **Smart Error Handling**:
  * **Column Renaming**: Renaming a column automatically rewrites all dependent formula expressions without breaking calculations.
  * **Column Deletion (`#REF!`)**: If a referenced column is deleted, dependent cells display a clear `#REF!` error instead of silently failing or wiping existing values.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FrbVlyl2GEBuMp84zR6v4%2Frounded-image%20(18).png?alt=media&amp;token=5b55d801-9f88-4296-9e38-84a21d34ef5d" alt=""><figcaption></figcaption></figure>

***

## Relational Data: Link, Lookup & Reverse Link

Turn disparate sheets into an interconnected relational database:

1. **Link to Sheet**: Associate a record in Sheet A with one or more records in Sheet B (e.g., linking an Order row to a specific Customer record).
2. **Lookup**: Automatically retrieve and display specific attributes from the linked record (e.g., pulling a Customer's email or phone number into the Order row). When the source record updates, the lookup cell syncs instantly.
3. **Reverse Link**: Diaflow automatically establishes a reciprocal reverse link on the target sheet, allowing you to see all associated records from both directions without manual configuration.
4. **Integrity Protection**: Deleting a linked record or column cascades a clear `#REF!` indicator to dependent lookups, making broken dependencies immediately visible.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FeOQGw9Vs2UwKlNFlU2Pu%2Frounded-image%20(19).png?alt=media&amp;token=41ab9ceb-79f2-4fed-95bf-d8ce47e58957" alt="" width="486"><figcaption></figcaption></figure>

***

## Table Footer Summaries

Located directly beneath the grid, the **Footer Summary Row** provides live metric calculations:

* **20 Aggregate Functions**: Calculate `Sum`, `Average`, `Count`, `Count Unique`, `Min`, `Max`, `Median`, `Standard Deviation`, and more.
* **Broad Type Support**: Available across 15 standard column types.
* **Filter-Aware Computations**: Aggregates are dynamically calculated over the **entire filtered and searched dataset**, not just the rows currently visible on the page.
* **Persistent Preferences**: Each column's selected aggregation method (or "None") is saved automatically per sheet.

{% hint style="info" %}
Footer Summaries are not supported on Option Breakdown, Assignee, Formula, or Lookup columns, and do not currently support multi-level group subtotals
{% endhint %}

***

## Automated Workflows with Row Triggers

Diaflow Tables natively connects with the **Diaflow Flow Builder**:

* **Trigger Events**:
  * *Row Created*
  * *Row Updated*
  * *Row Deleted*
  * *Row Created or Updated*
  * *Specific Column Changed to Value* (e.g., when `Status` changes to `"Approved"`)
* **Scoped Monitoring**: Row triggers are scoped to an individual sheet and can be configured to watch only specific columns, avoiding unnecessary Flow runs.
* **Live Event Preview**: In the Flow Builder, clicking **Run Node** displays a preview using real, recent table events rather than placeholder mock data.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FIyQlV5zgwbJlerjJcJiU%2Frounded-image%20(20).png?alt=media&amp;token=5cd36637-ff5f-4304-a80e-262754aa4dfb" alt=""><figcaption></figcaption></figure>

***

## Guardrails & System Limitations

To ensure stability, high throughput, and reliable automation runs, Diaflow Tables enforces the following specifications:

| Resource / Parameter          | Limit / Policy                                                                                                       |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **Max Columns per Sheet**     | **250 columns**                                                                                                      |
| **Table Name Length**         | **Max 50 characters**                                                                                                |
| **Quick-Search Scope**        | Searches across up to **50 columns** simultaneously                                                                  |
| **Reserved Naming Pattern**   | Sheet or table names starting with `dfsheet_*` are strictly reserved by the system                                   |
| **Automation Chaining**       | Table-trigger-to-Flow automation chains cap at a maximum of **5 hops** to prevent recursive loops                    |
| **Bulk Import Triggers**      | A single batch operation (e.g., large CSV import) triggers at most **50 row-level automation executions**            |
| **Rapid Edit De-duplication** | Rapid successive updates to the same row are de-duplicated within a **10-second window**                             |
| **Action Run Timeout**        | In-flight action cell runs that encounter worker timeouts or crashes are automatically failed after **\~10 minutes** |
