{"id":"Jassl32av61f","url":"https://totaljs.es/docs/tables/7-0/guides/introduction/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Introduction","summary":"What Total.js Tables does and where to start.","markdown":"---\ntitle: Introduction\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/introduction/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Introduction\n\n> What Total.js Tables does and where to start.\n\n> **Note:** Total.js Tables is available only with a [Total.js Enterprise](https://www.totaljs.com/enterprise/) subscription. See the [Tables page](https://www.totaljs.com/tables/) on totaljs.com.\n\nTotal.js Tables is a no-code tool for designing and managing database tables on top of PostgreSQL. You define your own tables and columns in the browser, link tables together, filter and sort records, and create or edit them in simple forms. Every table you design is a real PostgreSQL table, so other tools can read the same data.\n\n![The Tables screen with the Sales tab open](/files/Jassl22Zv60f.webp)\n\n## Words used in these pages\n\n- **Table**: a list of records with the columns you define, for example *Customers* or *Orders*.\n- **Column**: one field of a table, with a type such as Text, Number, Date or Dropdown.\n- **Record**: one row of a table, for example one customer.\n- **Relation**: a column of the type **Table** that points to a record in another table, for example the customer of an order.\n- **View**: a saved filter of a table with its own name and card.\n- **Tab** and **category**: the two levels that group the table cards on the main screen.\n\n## What you need\n\n- A server with Node.js 18 or newer.\n- PostgreSQL 15 or newer, with an empty database for Tables.\n- The source code of Total.js Tables, which you get from Total.js with an Enterprise subscription.\n\n## What to read next\n\n1. [Install Tables](../install/) and [sign in for the first time](../first-sign-in/).\n2. Learn the [main screen](../main-screen/).\n3. [Create a table](../create-a-table/), add [columns](../columns/) and link tables with [relations](../relations/).\n4. Work with data: [browse and filter](../browse-and-filter/), edit [records](../records/) and save [views](../views/).\n5. Connect other systems with [API tokens](../api-tokens/), [hooks](../hooks/) and [actions](../actions/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jassl02Xv60f","url":"https://totaljs.es/docs/tables/7-0/guides/install/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Install Tables","summary":"Install Total.js Tables from its source code on a server with Node.js and PostgreSQL.","markdown":"---\ntitle: Install Tables\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/install/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Install Tables\n\n> Install Total.js Tables from its source code on a server with Node.js and PostgreSQL.\n\n> **Note:** Total.js Tables is available only with a [Total.js Enterprise](https://www.totaljs.com/enterprise/) subscription. See the [Tables page](https://www.totaljs.com/tables/) on totaljs.com.\n\nTables is a Node.js application that keeps all its data in PostgreSQL. You install it from its source code.\n\n## Get the code\n\nYou get the source code of Total.js Tables from Total.js with a [Total.js Enterprise](https://www.totaljs.com/enterprise/) subscription. See the [Tables page](https://www.totaljs.com/tables/) on totaljs.com. Copy the folder of the app to your server, for example to `/www/tables/`.\n\n## Prepare PostgreSQL\n\nCreate an empty database and a user for Tables. For example, in `psql`:\n\n```sql\nCREATE USER tables WITH PASSWORD 'choose-a-strong-password';\nCREATE DATABASE tables OWNER tables;\n```\n\nYou do not need to create any table. Tables creates its own tables the first time it starts.\n\n## Install and configure\n\n**1.** Open a terminal in the folder of the app.\n\n**2.** Install the dependencies:\n\n```bash\nnpm install\n```\n\n**3.** Open the file `config` in the folder of the app and set the connection to your database and the address of the app:\n\n```text\ndatabase              : postgresql://tables:choose-a-strong-password@localhost:5432/tables\nurl                   : https://tables.yourdomain.com\n```\n\nAll the keys of this file are in [Configuration](../../reference/configuration/).\n\n## Start Tables\n\nStart the app:\n\n```bash\nnpm start\n```\n\nThis runs `node index.js 8000`, so Tables listens on port 8000. To use another port, give the number to `index.js`:\n\n```bash\nnode index.js 8080\n```\n\nOpen `http://127.0.0.1:8000` in your browser. The first start creates the system tables in the database. Then continue with the [first sign-in](../first-sign-in/).\n\nTo run Tables on a public server, read [Run Tables in production](../production/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasskr2Pv60f","url":"https://totaljs.es/docs/tables/7-0/guides/first-sign-in/","project":"tables","version":"7-0","section":"guides","language":"en","title":"First sign-in","summary":"Sign in with the account that Tables creates at the first start, then change it.","markdown":"---\ntitle: First sign-in\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/first-sign-in/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# First sign-in\n\n> Sign in with the account that Tables creates at the first start, then change it.\n\nThe first time Tables starts, it creates one administrator account with a random user name and a random password.\n\n## Sign in\n\n1. Open Tables in your browser. The sign-in page appears.\n2. Until the first sign-in, the page shows a box called **Default account** with the generated **User name** and **Password**.\n3. Click **Fill in the form** to copy them into the form, or type them.\n4. Click **Sign in**.\n\nAfter the first successful sign-in, the sign-in page shows only the form.\n\n## Change the account\n\nChange the generated name, user name and password right away:\n\n1. Click your initials in the top right corner.\n2. Choose **Change credentials**.\n3. Enter your **Name**, a **Login** and a new **Password**. Leave the password field empty if you only want to change the name or the login.\n4. Click **SUBMIT**.\n\nWhen you change the credentials, all the other open sessions are closed.\n\nTo sign out, click your initials and choose **Logout**.\n\nIf you lose the password, see [Installation and sign-in](../../faq/installation-and-sign-in/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jassl82ev61f","url":"https://totaljs.es/docs/tables/7-0/guides/main-screen/","project":"tables","version":"7-0","section":"guides","language":"en","title":"The main screen","summary":"The parts of the Tables screen: tabs, categories, table cards and the toolbar.","markdown":"---\ntitle: The main screen\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/main-screen/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# The main screen\n\n> The parts of the Tables screen: tabs, categories, table cards and the toolbar.\n\nAfter you sign in, Tables shows all your tables as cards.\n\n![The main screen with two tabs and three table cards](/files/Jassl22Zv60f.webp)\n\n## Tabs and categories\n\n- The buttons at the top, here **Inventory** and **Sales**, are **tabs**. Each tab shows its own tables.\n- Inside a tab, the headings such as **Contacts** and **Orders** are **categories**.\n\nYou set the tab and the category of each table in its settings. See [Create a table](../create-a-table/).\n\n## Table cards\n\nEach card shows the icon, the name, the number of records in brackets and the description of a table. On a card:\n\n- Click the card to [browse the records](../browse-and-filter/).\n- Click **Add** to create a new record.\n- Click the three dots to open the menu of the table.\n\n![The menu of a table card](/files/Jassl52cv61f.webp)\n\nThe menu has these items:\n\n- **Browse data** opens the list of records.\n- **Add** creates a record.\n- **Import CSV** imports records from a file. See [Import a CSV file](../import-csv/).\n- **Export schema** downloads the structure of this table. See [Export, import and print the schema](../schema-files/).\n- **Clone** opens a new table form filled with the settings of this table.\n- **Settings** opens the [table settings](../table-settings/).\n- **Truncate data** and **Remove** are described in [Maintenance](../maintenance/).\n\n## The toolbar\n\n- **Search** finds a table or a view by its name. Type a few letters and choose the table.\n- **Options** opens the menu for the whole database: **Create table**, **Export schema**, **Print schema**, **Import schema**, **Toggle diagram**, **Maintenance** and **Remove all tables**.\n- **Refresh** reloads the tables and their counts.\n\n![The Options menu](/files/Jassl72dv60f.webp)\n\n## The side bar\n\nThe icons on the left switch between the tables (database icon) and the [API tokens](../api-tokens/).\n\n## Windows\n\nTables and records open in windows inside the page. You can move them, resize them, maximize them and minimize them. A minimized window appears as a button at the bottom of the screen; click it to bring the window back.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasskm2Kv61f","url":"https://totaljs.es/docs/tables/7-0/guides/create-a-table/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Create a table","summary":"Create a new table, give it a name, a place on the main screen and its columns.","markdown":"---\ntitle: Create a table\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/create-a-table/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Create a table\n\n> Create a new table, give it a name, a place on the main screen and its columns.\n\nA table holds records of one kind, for example customers. Every table already has the columns **ID**, **Name**, **Created** and **Updated**. You add your own columns.\n\n## Create the table\n\n**1.** Click **Options** and choose **Create table**.\n\n**2.** Fill in the top of the form:\n- **Pluralized name**: the name of the table, for example `Customers`.\n- **Singular**: the name of one record, for example `Customer`. Tables uses it in the title of a record and in buttons such as **Add Customer**.\n- **Tab** and **Category**: where the card appears on the main screen. Choose an existing one or type a new name.\n- **Color**, **Icon** and **Icon 2**: the look of the card.\n- **Description**: a short text shown on the card.\n\n**3.** Check the options you need. They are explained in [Table settings](../table-settings/).\n\n**4.** In the **Columns** tab, click **Add** to add each column. See [Columns](../columns/).\n\n**5.** Click **SUBMIT**.\n\n![The table form](/files/Jasskl2Jv60f.webp)\n\nTables creates the table in PostgreSQL and shows its card on the main screen.\n\n## The Name column\n\nThe **Name** column is the main text of each record. It is shown in bold in lists and used when another table links to this one. Click **Name** in the list of columns to rename it, for example to `Company` or `Subject`.\n\n## Change a table later\n\nOpen the three dots on the card and choose **Settings**, or click **Settings** in the list of records. The form is the same, titled **Update table**. The ID of the table, for example `t118h7`, is shown at the top.\n\n## Copy a table configuration\n\nThe **Copy** button at the top of the form copies the whole configuration of the table as text. In another table, **Paste** opens a window where you paste that text. Tables shows the differences between the two configurations; choose what to take and click **SUBMIT**.\n\nTo create a new table from an existing one, use **Clone** in the menu of the card.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasske2Ev61f","url":"https://totaljs.es/docs/tables/7-0/guides/columns/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Columns","summary":"Add columns to a table, choose their type and set how they behave.","markdown":"---\ntitle: Columns\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/columns/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Columns\n\n> Add columns to a table, choose their type and set how they behave.\n\nColumns are the fields of a table. You manage them in the **Columns** tab of the [table form](../create-a-table/).\n\n## Add a column\n\n1. Open the settings of the table.\n2. In the **Columns** tab, click **Add**.\n3. Choose the **Type**, for example **Number** or **Dropdown**. All the types are in [Column types](../../reference/column-types/).\n4. Enter the **Name**.\n5. Click **SUBMIT** in the column window, then **SUBMIT** in the table form.\n\n![The column form of a Number column](/files/Jasskd2Dv60f.webp)\n\nEach column gets an ID such as `x01`, `x02` and so on. This ID is the name of the column in PostgreSQL and in the [API](../../reference/api/). Keep the generated ID.\n\n## Common options\n\n- **Required**: the record cannot be saved without a value.\n- **Read-only on user interface**: the value is shown but cannot be changed in the form.\n- **Hide on user interface**: the column is not shown.\n- **The user must enter a note when changing the value**: in a table with [versioning](../versions/), Tables asks for a note when someone changes this value. The note appears in the **Changelog** column of the versions.\n- **Allow cloning**: the value is copied when a record is cloned.\n- **Allow auto-complete**: for text columns, the form suggests values already used in the table.\n- **Help message**: a text shown under the field in the record detail.\n- **Note**: an internal note for you, shown in the list of columns.\n- **Error message**: the message shown when the value is invalid.\n- **Default value**: the value of a new record, written as a JavaScript expression, for example `'Spain'` or `0`.\n- **Group**: puts columns under a common heading in the form.\n\n## Formatting\n\nIn the **Formatting** tab of the column window:\n\n- **Format** adds text around the value. `{0}` is the value, so `{0} EUR` shows `250,00 EUR`.\n- **Decimals** sets the decimal places of numbers.\n- **Align**, **Listing width**, **Use monospace font**, **Color** and **Icon** change how the value looks.\n- **Transform** changes text to lower case, upper case or capitalized words when the record is saved.\n- **Dynamic formatting** colors the value when a condition is true. See [Conditional formatting](../conditional-formatting/).\n\n## Where the column appears\n\nIn the **Viewing** tab, **Show the column** decides where the column appears: in the listing, in the detail, in linked listings and details, and in the print.\n\n## Order of the columns\n\nDrag the columns in the **Columns** tab to change their order in the form. The order in the list of records is set in the **Listing** tab; see [Table settings](../table-settings/).\n\n## Change or remove a column\n\nClick a column to change it. The type can only be changed to a type that stores the same kind of data, for example from **Text** to **Email**. Click the trash icon to remove a column. Removing a column removes its data from the database when you submit the table form.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasslL2pv60f","url":"https://totaljs.es/docs/tables/7-0/guides/relations/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Relations between tables","summary":"Link a record to a record of another table with a column of the type Table.","markdown":"---\ntitle: Relations between tables\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/relations/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Relations between tables\n\n> Link a record to a record of another table with a column of the type Table.\n\nA relation links two tables. For example, each order belongs to one customer. You create it with a column of the type **Table** in the table that points to the other one.\n\n## Create a relation\n\n1. Open the settings of the table that holds the link, for example *Orders*.\n2. In the **Columns** tab, click **Add**.\n3. Choose the type **Table**.\n4. In **Table**, choose the table to link to, for example *Customers*.\n5. Enter the **Name**, for example `Customer`.\n6. Click **SUBMIT** in the column window and in the table form.\n\nIn the list of orders, the **Customer** column shows the name of the linked customer. In the detail of an order, you choose the customer from a list.\n\n## Options of a relation\n\n- **Render items in all related tables**: decides how the linked records appear in the detail of the other table. With **As list**, the detail of a customer shows a panel with the customer's orders.\n- **Show link button**: adds **Show more** under the value in the detail. Click it to open the linked record.\n- **Filter by**: limits which records can be chosen.\n\n![The detail of a customer with the panel of its orders](/files/JasslK2ov61f.webp)\n\n## See the relations\n\n**Options** > **Toggle diagram** shows all the tables and their relations. See [Diagram](../diagram/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasslU2yv61f","url":"https://totaljs.es/docs/tables/7-0/guides/table-settings/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Table settings","summary":"The options of a table: removal, versioning, cloning, favorites, sorting and the other tabs of the table form.","markdown":"---\ntitle: Table settings\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/table-settings/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Table settings\n\n> The options of a table: removal, versioning, cloning, favorites, sorting and the other tabs of the table form.\n\nOpen the three dots on a card and choose **Settings** to change a table. Below the name and the look of the table, the form has a list of options and several tabs.\n\n## Options\n\n- **Allow removal of documents from the user interface**: shows **Remove** in the list and in the detail. Uncheck it to stop records being removed from the screen.\n- **Show QR Code in detail**: shows a QR code of the record in its detail.\n- **Enable versioning**: keeps the previous values each time a record changes. See [Versions of a record](../versions/).\n- **Add to favorites**: marks the table as a favorite.\n- **Auto-close detail after saving**: closes the record window after **Save**.\n- **Allow cloning**: shows **Clone** in the **More** menu of a record.\n- **Prompt before closing with unsaved changes**: asks before closing a record that has unsaved changes.\n- **Stores deleted records for manual recovery or review**: keeps a copy of each removed record. See [Removed records](../removed-records/).\n\n## Tabs of the form\n\n- **Columns**: the columns of the table. See [Columns](../columns/).\n- **Listing**: the default sort (**Sort by**) and the order of the columns in the list of records. Drag the columns to reorder them.\n- **Actions**: buttons that send a record to another system. See [Actions](../actions/).\n- **Hooks**: addresses that receive every new, changed and removed record. See [Hooks](../hooks/).\n- **Permissions**: limits the table to user groups.\n- **Formatting**: colors whole rows when a condition is true. See [Conditional formatting](../conditional-formatting/).\n- **Other**: **Custom attributes**, the **Thumbnail** column and the **Template** of the list.\n\n## Show records as cards\n\nIn the **Other** tab, **Template** changes how the list of records looks. **Default** is the table. **Cards** shows each record as a card with its values.\n\n![The Products table shown with the Cards template](/files/JasslT2xv60f.webp)\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasski2Hv60f","url":"https://totaljs.es/docs/tables/7-0/guides/conditional-formatting/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Conditional formatting","summary":"Color rows or values in the list of records when a condition is true.","markdown":"---\ntitle: Conditional formatting\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/conditional-formatting/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Conditional formatting\n\n> Color rows or values in the list of records when a condition is true.\n\nConditional formatting highlights records, for example large orders or new orders. A rule has a condition and a style.\n\n## Format whole rows\n\n1. Open the settings of the table and go to the **Formatting** tab.\n2. Click **Add**.\n3. Enter an **Internal description**, for example `Large order`.\n4. Enter the **Condition** in JavaScript. `row` is the record and its columns use their IDs, for example `row.x04 > 1000`.\n5. Choose a **Font color**, a **Background color**, and **Bold**, **Italic**, **Underline** or **Strike**.\n6. Click **Save**, then **SUBMIT**.\n\n## Format one value\n\n1. Open the column in the **Columns** tab.\n2. In the **Formatting** tab of the column window, find **Dynamic formatting** and click **Add**.\n3. Enter the description, the condition and the style. **Replace the value with text** shows a text instead of the value.\n4. Click **Save**, then **SUBMIT** in both forms.\n\nIn this list, the order of *Office chairs* is bold because its amount is over 1000, and the status **New** is red:\n\n![The list of orders with a bold row and red statuses](/files/Jasskh2Gv61f.webp)\n\n## Write conditions\n\n- Compare numbers: `row.x04 > 1000`\n- Compare a Dropdown value with its ID: `row.x05 === 'new'`\n- Combine conditions: `row.x04 > 100 && row.x05 === 'new'`\n\nThe ID of each column is shown next to its name in the **Columns** tab.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasslQ2vv60f","url":"https://totaljs.es/docs/tables/7-0/guides/sql-columns/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Calculated columns","summary":"Show a value calculated by PostgreSQL from other columns with the SQL column type.","markdown":"---\ntitle: Calculated columns\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/sql-columns/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Calculated columns\n\n> Show a value calculated by PostgreSQL from other columns with the SQL column type.\n\nA column of the type **SQL** shows a value that PostgreSQL calculates from the other columns of the record. It is read-only and is not stored; it is calculated each time the records are read.\n\n## Add a calculated column\n\n**1.** Open the settings of the table and click **Add** in the **Columns** tab.\n\n**2.** Choose the type **SQL**.\n\n**3.** Enter the **Name**, for example `Stock value`.\n\n**4.** In **SQL expression**, write the calculation. Refer to the other columns with the `col.` alias and their IDs:\n\n```sql\ncol.x02 * col.x03\n```\n\n**5.** Click **SUBMIT** in both forms.\n\nIn a *Products* table where `x02` is the price and `x03` is the number in stock, this column shows the value of the stock of each product.\n\nAny expression that PostgreSQL accepts in a `SELECT` works, for example `UPPER(col.x01)` or `COALESCE(col.x04, 0) * 1.21`.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasska2Bv60f","url":"https://totaljs.es/docs/tables/7-0/guides/browse-and-filter/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Browse and filter records","summary":"Open the list of records of a table, filter, sort, page through it and export it to CSV.","markdown":"---\ntitle: Browse and filter records\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/browse-and-filter/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Browse and filter records\n\n> Open the list of records of a table, filter, sort, page through it and export it to CSV.\n\nClick a table card to open the list of its records.\n\n![The list of orders](/files/JasskX29v60f.webp)\n\n## Toolbar\n\n- **Add** opens a form for a new record.\n- **Update** opens the selected record. Select a record with the checkbox at the start of its row.\n- **Remove** removes the selected records.\n- **Actions** shows **Create view** and your own [actions](../actions/).\n- **Refresh** reloads the list.\n- **Settings** opens the [table settings](../table-settings/).\n\nOn the right, **Export to CSV** downloads the records, the magnifier finds a record by its ID, and the ID of the table is shown with a button to copy it.\n\n## Open a record\n\nClick a row to open the record in its own window. See [Records](../records/).\n\n## Filter\n\nUnder each column heading there is a **Filter** field. Type a value and press Enter. The list shows only the records that match, and the field is highlighted. Click the red cross in the field to remove the filter. You can filter several columns at the same time.\n\n![The list of orders filtered by customer](/files/JasskZ2Av61f.webp)\n\nTo keep a filter, save it as a [view](../views/).\n\n## Sort\n\nClick a column heading to sort by that column. Click again to reverse the order. The default order is set in the **Listing** tab of the [table settings](../table-settings/).\n\n## Pages\n\nThe list shows up to 100 records per page. Use the arrows at the bottom to move between pages. The number of records is shown at the bottom right.\n\n## Export to CSV\n\n1. Click **Export to CSV**.\n2. Choose **Current page**, **Selected rows** or **All rows**.\n\nThe browser downloads a CSV file with the columns of the list.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasslI2mv61f","url":"https://totaljs.es/docs/tables/7-0/guides/records/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Records","summary":"Create, edit, clone, copy and remove records in the record window.","markdown":"---\ntitle: Records\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/records/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Records\n\n> Create, edit, clone, copy and remove records in the record window.\n\nA record opens in its own window. The fields are the columns of the table.\n\n![The detail of an order](/files/JasslD2kv61f.webp)\n\n## Create a record\n\n1. Click **Add** on the table card or in the list.\n2. Fill in the fields. Required fields have a red star.\n3. Click **Save**.\n\n## Edit a record\n\n1. Open the record from the list.\n2. Click a value to change it. For a Dropdown or a relation, choose the new value from the list.\n3. Click **Save**. The button is enabled as soon as something changes.\n\n![The detail of an order with the changed amount](/files/JasslG2lv60f.webp)\n\nAt the bottom of the window, Tables shows who created and changed the record, when, and the **Revision** number, which grows with each change.\n\n## The More menu\n\n- **Refresh** reloads the record.\n- **Print** prints the record.\n- **Share** copies a link to the record. The link opens Tables with this record.\n- **Versions** shows the previous values. It appears when the table has versioning. See [Versions of a record](../versions/).\n- **Copy data** copies the values of the record, and **Paste data** fills the form with copied values.\n- **Clone** opens a new record with the values of this one.\n\n## Visibility\n\nThe **Visibility** field limits a record to some users or groups. **No restrictions** means that everyone who can open the table sees the record.\n\n## Remove a record\n\nClick **Remove** in the record window and confirm. To remove several records, select them in the list and click **Remove** there. If the table keeps removed records, see [Removed records](../removed-records/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasslY31v60f","url":"https://totaljs.es/docs/tables/7-0/guides/versions/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Versions of a record","summary":"Keep the history of each record and restore a previous version.","markdown":"---\ntitle: Versions of a record\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/versions/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Versions of a record\n\n> Keep the history of each record and restore a previous version.\n\nWith versioning, Tables saves the previous values of a record every time it changes.\n\n## Turn on versioning\n\n1. Open the settings of the table.\n2. Check **Enable versioning**.\n3. Click **SUBMIT**.\n\n## See the versions\n\n1. Open a record.\n2. Click **More** and choose **Versions**.\n\n![The versions of an order](/files/JasslX30v61f.webp)\n\nEach row is one change: when it happened (**Created**), who made it (**User**), the note of the change (**Changelog**) and the values before the change (**Keys**). In this example, the amount was 1 250,50 before Jane Doe changed it.\n\n## Restore a version\n\n1. In the **Versions** window, click the row of the version you want.\n2. Tables fills the record with those values and shows a message.\n3. Click **Save** to keep them. If you close the record without saving, nothing changes.\n\n## Ask for a note\n\nTo ask the user for a note each time a value changes, open the column and check **The user must enter a note when changing the value**. The note is shown in the **Changelog** column.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasslN2rv60f","url":"https://totaljs.es/docs/tables/7-0/guides/removed-records/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Removed records","summary":"Keep a copy of every removed record so you can review or recover it.","markdown":"---\ntitle: Removed records\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/removed-records/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Removed records\n\n> Keep a copy of every removed record so you can review or recover it.\n\nBy default, a removed record is gone. A table can instead keep a copy of each removed record.\n\n## Keep removed records\n\n1. Open the settings of the table.\n2. Check **Stores deleted records for manual recovery or review**.\n3. Click **SUBMIT**.\n\nFrom then on, each record removed from this table, from the screen or through the [API](../../reference/api/), is copied to the database table `tbl_removed` before it is removed.\n\n## Review removed records\n\nThe copies are not shown in the Tables screens. Read them in PostgreSQL. Each row has the ID of the record (`id`), the ID of its table (`tableid`), all the values in `data` (JSON), who removed it (`createdby`) and when (`dtcreated`):\n\n```sql\nSELECT id, tableid, createdby, dtcreated, data\nFROM tbl_removed\nORDER BY dtcreated DESC;\n```\n\nTo recover a record, create it again with the values from `data`, for example by pasting them in a new record or by sending them to the API.\n\n## Stop removal from the screen\n\nTo stop users removing records at all, uncheck **Allow removal of documents from the user interface** in the table settings.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasslc34v61f","url":"https://totaljs.es/docs/tables/7-0/guides/views/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Views","summary":"Save a filtered list of a table as a view with its own card.","markdown":"---\ntitle: Views\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/views/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Views\n\n> Save a filtered list of a table as a view with its own card.\n\nA view is a saved filter of a table. It has its own card on the main screen, so you can open, for example, the orders of one customer with one click.\n\n## Create a view\n\n1. Open the list of the table.\n2. Set the filters you want, for example `North` in the **Customer** column.\n3. Click **Actions** and choose **Create view**.\n4. Enter the **Name** of the view, for example `Northwind orders`.\n5. Choose the **Tab**, the **Category**, the **Color**, the **Icon** and the **Description**. They start with the values of the table.\n6. Under **Columns**, click the columns you do not want to show in the view.\n7. Click **SUBMIT**.\n\n![The form of a new view](/files/Jassla33v60f.webp)\n\nThe view appears as a card next to the table, with a filter icon in its corner. Click it to see the records that match the saved filter. New records that match appear in the view automatically.\n\n## Change or remove a view\n\nOpen the three dots on the card of the view. **Settings** opens the form of the view, and **Remove** removes the view. Removing a view never removes records.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasskz2Vv60f","url":"https://totaljs.es/docs/tables/7-0/guides/import-csv/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Import a CSV file","summary":"Import records from a CSV file into a table and map the file columns to the table columns.","markdown":"---\ntitle: Import a CSV file\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/import-csv/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Import a CSV file\n\n> Import records from a CSV file into a table and map the file columns to the table columns.\n\nYou can fill a table with records from a CSV file, for example a list exported from a spreadsheet.\n\n## Prepare the file\n\n- The first line holds the names of the columns.\n- Use a comma or a semicolon between values.\n- If a column of the file has the same name as a column of the table, Tables maps it automatically.\n\n```text\nProduct,Code,Price,In stock\nStanding desk,DE-400,399.90,5\nMonitor arm,MA-500,59,25\n```\n\n## Import\n\n1. Open the three dots on the table card and choose **Import CSV**.\n2. Choose the file.\n3. Check the **Mapping**: each column of the table on the left gets a column of the file on the right. Click a value to change it, or leave `---` to skip a column.\n4. Click **IMPORT DATA**.\n\n![The Import CSV data window with the mapping](/files/Jasskx2Uv61f.webp)\n\nThe window shows the **Total number of rows for import** before you start, and the number imported and the errors while it works. Wait until the import has finished.\n\n## Options\n\n- **Stop importing when an error occurs**: stops at the first row that cannot be saved.\n- **Filter**: use it to update existing records. For a column that identifies a record, for example **Code**, click `---` and choose the column of the file with the same value. A row that matches an existing record updates it. Without a filter, every row creates a new record.\n- **Create a record if it doesn't exist**: with a filter, rows that match no record are skipped. Check this option to create them instead.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasskP22v61f","url":"https://totaljs.es/docs/tables/7-0/guides/actions/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Actions","summary":"Add buttons that send a record to another system or to your own server code.","markdown":"---\ntitle: Actions\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/actions/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Actions\n\n> Add buttons that send a record to another system or to your own server code.\n\nAn action is a button in the **Actions** menu of a table. When a user runs it, Tables sends the record to an address of another system, or to an action of an [extension](../../development/extensions/), and shows the answer.\n\n## Add an action\n\n**1.** Open the settings of the table and go to the **Actions** tab.\n\n**2.** Click **Add**.\n\n**3.** Fill in the action:\n- **Name**: the text of the button, for example `Approve`.\n- **Endpoint**: a full address such as `https://erp.example.com/api/approve/`, or the name of a server action of an extension such as `Orders|approve`.\n- **Show**: **Everywhere**, **List** or **Detail**.\n- **Type**: **All**, **Create** or **Update**.\n- **Icon**: the icon of the button.\n\n**4.** Click **Save**, then **SUBMIT**.\n\n## Run an action\n\nIn the record window, the action is in the **Actions** menu at the start of the toolbar. An action of the type **Update** appears in the window of an existing record, **Create** in the window of a new record, and **All** in both.\n\n![The Actions menu of an order with the Approve action](/files/JasskN21v60f.webp)\n\nIn the list of records, open **Actions**. With no record selected, the menu shows the actions of the types **All** and **Create**. When records are selected, it shows the actions of the types **All** and **Update**, and runs the action once for each selected record.\n\n## What the endpoint receives\n\nTables sends a `POST` request with JSON to an address, or calls the server action directly. The data has the ID of the record, the table, the values and the user who ran the action. The full format is in [Hook and action data](../../reference/hook-and-action-data/).\n\nIf the endpoint answers with a text, Tables shows it in a message. For example, an endpoint that answers `Order approved` shows that message to the user.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasskv2Sv61f","url":"https://totaljs.es/docs/tables/7-0/guides/hooks/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Hooks","summary":"Send every new, changed or removed record of a table to another system automatically.","markdown":"---\ntitle: Hooks\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/hooks/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Hooks\n\n> Send every new, changed or removed record of a table to another system automatically.\n\nA hook is an address that Tables calls automatically when a record changes. Use it to keep another system up to date, for example to send every new order to an accounting system.\n\n## Set up hooks\n\n**1.** Open the settings of the table and go to the **Hooks** tab.\n\n**2.** Enter the addresses:\n- **Create**: called after a new record is saved.\n- **Update**: called after a record is changed.\n- **Delete**: called after a record is removed.\n\n**3.** Click **SUBMIT**.\n\n![The Hooks tab of a table](/files/Jassku2Rv60f.webp)\n\nLeave a field empty to send nothing for that event.\n\n## What the address receives\n\nTables sends a `POST` request with a JSON body:\n\n```json\n{\n\t\"tableid\": \"t118h7\",\n\t\"app\": \"Tables\",\n\t\"user\": { \"id\": \"admin\", \"name\": \"Jane Doe\" },\n\t\"data\": {\n\t\t\"id\": \"JasodS1g561f\",\n\t\t\"name\": \"Office chairs\",\n\t\t\"x02_id\": \"JasodS1c561f\",\n\t\t\"x02\": \"Northwind Supplies\",\n\t\t\"x04\": 1300,\n\t\t\"x05\": \"paid\"\n\t}\n}\n```\n\n`data` holds the whole record as it is stored, with the values of all its columns. For a relation, `x02_id` is the ID of the linked record and `x02` its name. The full format is in [Hook and action data](../../reference/hook-and-action-data/).\n\nHooks run for records saved in the screens, through the [API](../../reference/api/) and by a [CSV import](../import-csv/). Tables does not wait for the answer of the hook, so a slow or failing address does not block the user.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasskS25v60f","url":"https://totaljs.es/docs/tables/7-0/guides/api-tokens/","project":"tables","version":"7-0","section":"guides","language":"en","title":"API tokens","summary":"Create tokens that let other applications read and write your tables through the API.","markdown":"---\ntitle: API tokens\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/api-tokens/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# API tokens\n\n> Create tokens that let other applications read and write your tables through the API.\n\nAn API token lets another application or a script use Tables without signing in. Each token has a name, so you know which application uses it.\n\n## Create a token\n\n1. Click the API icon in the side bar on the left.\n2. Click **Create**.\n3. Enter the **App name**, for example `Demo integration`, and a **Summary** if you like.\n4. Check **Super admin privileges** only if the application must change the structure of tables. Without it, the token can read and write records.\n5. Click **SUBMIT**.\n\n![The API Tokens screen with one token](/files/JasskQ24v61f.webp)\n\n## Copy the token\n\nOpen the three dots on the card of the token and choose **Copy token**. Keep the token secret, like a password.\n\n## Use the token\n\nSend the token in the `x-token` header, or in the `token` parameter of the address. For example:\n\n```bash\ncurl -X POST https://tables.yourdomain.com/api/ \\\n\t-H 'x-token: YOUR_TOKEN' \\\n\t-H 'content-type: application/json' \\\n\t-d '{ \"schema\": \"Tables|list\" }'\n```\n\nAll the calls are in [API](../../reference/api/).\n\n## Block or remove a token\n\n- To stop a token for a while, open **Edit** and check **Ban token**.\n- To remove it for good, choose **Remove** in its menu.\n\nRecords created with a token show the app name of the token as their creator.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasslP2tv60f","url":"https://totaljs.es/docs/tables/7-0/guides/schema-files/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Export, import and print the schema","summary":"Save the structure of your tables to a file, load it into another Tables, or print it.","markdown":"---\ntitle: Export, import and print the schema\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/schema-files/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Export, import and print the schema\n\n> Save the structure of your tables to a file, load it into another Tables, or print it.\n\nThe schema is the structure of your tables: their settings, columns and views, without the records. You can save it to a JSON file, for example to copy your tables from a test server to the production server.\n\n## Export the schema\n\n- For all tables: **Options** > **Export schema** > **All**.\n- For the tables of one tab: **Options** > **Export schema** > the name of the tab.\n- For one table: the three dots on its card > **Export schema**.\n\nPoint at **Export schema** in the **Options** menu to open its submenu. The browser downloads a JSON file. When you export some tables, the file also contains the tables that they link to.\n\n## Import a schema\n\n1. Click **Options** and choose **Import schema**.\n2. Choose the JSON file.\n\nTables creates the tables and views of the file. A table that already exists with the same ID is updated with the settings of the file. Records are not imported; use [Import a CSV file](../import-csv/) for data.\n\n## Print the schema\n\n**Options** > **Print schema** > **All** or the name of a tab opens a printable description of the tables and their columns.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasskq2Nv60f","url":"https://totaljs.es/docs/tables/7-0/guides/diagram/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Diagram","summary":"See all tables and the relations between them as a diagram.","markdown":"---\ntitle: Diagram\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/diagram/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Diagram\n\n> See all tables and the relations between them as a diagram.\n\nThe diagram draws each table as a box and each [relation](../relations/) as a line between two tables.\n\n1. Click **Options**.\n2. Choose **Toggle diagram**.\n\n![The diagram of the Customers, Orders and Products tables](/files/Jassko2Mv61f.webp)\n\nDrag a box to move it; Tables remembers its position. Click **Options** in a box to open the settings of that table. Choose **Toggle diagram** again to return to the cards.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasslA2gv61f","url":"https://totaljs.es/docs/tables/7-0/guides/maintenance/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Maintenance","summary":"Reload the structure, vacuum the database, empty a table, or remove tables.","markdown":"---\ntitle: Maintenance\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/maintenance/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Maintenance\n\n> Reload the structure, vacuum the database, empty a table, or remove tables.\n\nThese tools are for administrators. Point at **Maintenance** in the **Options** menu to open its submenu.\n\n## Reload structure\n\n**Options** > **Maintenance** > **Reload structure** checks every table and view in PostgreSQL against the settings of your tables and fixes the differences. Use it if the database was changed outside Tables or after restoring a backup.\n\n## Vacuum\n\n**Options** > **Maintenance** > **Vacuum** runs `VACUUM FULL` on the database. It frees the space of removed and changed records. On a large database it can take a while and locks the tables, so run it when nobody is working.\n\n## Truncate data\n\nThe three dots on a card > **Truncate data** removes all the records of that table and keeps the table and its settings. Tables asks you to confirm twice.\n\n## Remove a table\n\nThe three dots on a card > **Remove** removes the table, its records and its views. Tables asks you to confirm twice. This cannot be undone, so [export the schema](../schema-files/) and back up the database first.\n\n## Remove all tables\n\n**Options** > **Remove all tables** removes every table and its records. Tables asks you to confirm twice.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasskT27v60f","url":"https://totaljs.es/docs/tables/7-0/guides/audit-log/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Audit log","summary":"Record who created, changed or removed data and tables.","markdown":"---\ntitle: Audit log\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/audit-log/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Audit log\n\n> Record who created, changed or removed data and tables.\n\nThe audit log records the changes that users and API tokens make: saved, cloned and removed records, and changes to tables and views.\n\n## Turn on the audit log\n\n**1.** Open the file `config` of the app.\n\n**2.** Set `auditlogs` to `true`:\n\n```text\nauditlogs             : true\n```\n\n**3.** Restart Tables.\n\n## Read the audit log\n\nTables writes the log to the database table `tbl_log`. Read it with any PostgreSQL client:\n\n```sql\nSELECT dtcreated, createdby, action, ip\nFROM tbl_log\nORDER BY dtcreated DESC\nLIMIT 50;\n```\n\n`action` is the name of the operation, for example `Data|save` or `Tables|save`. `createdby` is the user or the app name of the API token.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasslB2iv61f","url":"https://totaljs.es/docs/tables/7-0/guides/production/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Run Tables in production","summary":"Keep Tables running on a server, protect it, and back up its data.","markdown":"---\ntitle: Run Tables in production\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/production/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Run Tables in production\n\n> Keep Tables running on a server, protect it, and back up its data.\n\nTables is a Node.js application. On a server, keep it running with a process manager and put it behind a web server with HTTPS.\n\n## Keep it running\n\nRun the app with a process manager such as systemd or PM2, so it starts with the server and restarts after an error. The command is the same as by hand, run in the folder of the app:\n\n```bash\nnode index.js 8000\n```\n\nTo start the app in release mode, add `--release`:\n\n```bash\nnode index.js 8000 --release\n```\n\n## Protect access\n\n- Change the generated account at the [first sign-in](../first-sign-in/).\n- Serve Tables over HTTPS, for example with nginx in front of it, and set `url` in the `config` file to the public address.\n- Do not open the PostgreSQL port to the internet.\n- Give each application its own [API token](../api-tokens/), and remove the tokens you do not use.\n\n## Back up\n\nAll your data is in PostgreSQL: the records, the settings of the tables, the views, the versions and the API tokens. Back up the database with your usual tool, for example:\n\n```bash\npg_dump --format=custom --file=tables.backup tables\n```\n\nAlso keep a copy of the `config` file and of the folder `databases` in the app folder, which holds the account.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasskM1zv60f","url":"https://totaljs.es/docs/tables/7-0/guides/account/","project":"tables","version":"7-0","section":"guides","language":"en","title":"Your account","summary":"Change your name, login and password, and sign out.","markdown":"---\ntitle: Your account\nproject: Tables\nversion: 7.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/guides/account/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Your account\n\n> Change your name, login and password, and sign out.\n\nTables has one built-in administrator account. Its menu is under your initials in the top right corner.\n\n## Change credentials\n\n1. Click your initials.\n2. Choose **Change credentials**.\n3. Change the **Name**, the **Login** or the **Password**. Keep the password field empty if you don't want to change it.\n4. Click **SUBMIT**.\n\nThe name appears in the records you create and change, and in the [versions](../versions/). When you change the credentials, all open sessions are closed except yours.\n\n## Sign out\n\nClick your initials and choose **Logout**.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasslm3Iv61f","url":"https://totaljs.es/docs/tables/7-0/reference/configuration/","project":"tables","version":"7-0","section":"reference","language":"en","title":"Configuration","summary":"The keys of the config file of Total.js Tables.","markdown":"---\ntitle: Configuration\nproject: Tables\nversion: 7.0\nsection: reference\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/reference/configuration/\nupdated: 2026-11-20T06:40:02.622Z\n---\n\n# Configuration\n\n> The keys of the config file of Total.js Tables.\n\nTables reads its settings from the file `config` in the folder of the app. Each line is a key, a colon and a value. Lines that start with `//` are comments. Restart Tables after you change the file.\n\n```text\nname                  : Tables\nurl                   : https://tables.yourdomain.com\ndatabase              : postgresql://tables:password@localhost:5432/tables\nschema                : public\nauditlogs             : false\n```\n\n## Keys\n\n| Key | Default | What it does |\n|---|---|---|\n| `database` | | The PostgreSQL connection string: `postgresql://user:password@host:port/database`. Required. |\n| `schema` | `public` | The PostgreSQL schema where Tables keeps its tables. If it does not exist, Tables creates it at the start. |\n| `url` | | The public address of the app, for example `https://tables.yourdomain.com`. |\n| `name` | `Tables` | The name of the app, shown in the top left corner and on the sign-in page. |\n| `icon` | `ti ti-database-alt` | The icon of the app, a Total.js icon class. |\n| `auditlogs` | `false` | `true` writes every change to the audit log. See [Audit log](../../guides/audit-log/). |\n| `$api` | `/api/` | The address of the API. Keep the default. |\n| `cdn` | `/cdn` | Where the browser loads the user interface libraries from. Keep the default. |\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:02.622Z"}
{"id":"Jassll3Gv61f","url":"https://totaljs.es/docs/tables/7-0/reference/column-types/","project":"tables","version":"7-0","section":"reference","language":"en","title":"Column types","summary":"All the types of a column, what they store and how they are stored in PostgreSQL.","markdown":"---\ntitle: Column types\nproject: Tables\nversion: 7.0\nsection: reference\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/reference/column-types/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Column types\n\n> All the types of a column, what they store and how they are stored in PostgreSQL.\n\nChoose the type when you add a column. Later, a type can only be changed to another type with the same kind of data. See [Columns](../../guides/columns/).\n\n| Type | What it stores | PostgreSQL type |\n|---|---|---|\n| **Text** | A short text. | `TEXT` |\n| **Multiline** | A longer text on several lines. | `TEXT` |\n| **Name** | The name of a person. | `TEXT` |\n| **Number** | A number. **Decimals** in the formatting sets the decimal places. | `NUMERIC` |\n| **Auto increment** | A number that Tables fills in for each new record, in the format you set. | `TEXT` |\n| **Checkbox** | Yes or no. | `BOOLEAN` |\n| **Date** | A date. | `DATE` |\n| **Date + Time** | A date and a time. | `TIMESTAMP` |\n| **Dropdown** | One value from a list of items that you define. | `TEXT` |\n| **Radio button** | One value from a list of items, shown as radio buttons. | `TEXT` |\n| **Tags** | Several words. | `TEXT[]` |\n| **Email** | An email address, with a button to write to it. | `TEXT` |\n| **Phone** | A phone number, with a button to call it. | `TEXT` |\n| **URL address** | A web address. | `TEXT` |\n| **ZIP code** | A postal code. | `TEXT` |\n| **Color** | A color. | `TEXT` |\n| **Icon** | An icon. | `TEXT` |\n| **JSON** | JSON data. | `TEXT` |\n| **HTML content** | Formatted text. | `TEXT` |\n| **Password** | A password, stored as a hash, never as plain text. | `TEXT` |\n| **Secret** | A value hidden in the screens until you click **show**. | `TEXT` |\n| **International Article Number (EAN-13)** | A barcode number. | `TEXT` |\n| **Map position** | A position on a map. | `TEXT` |\n| **User** | A user name. | `TEXT` |\n| **File** | One uploaded file. | `JSON` |\n| **Attachments** | Several uploaded files. | `JSON` |\n| **Photo** | One image. | `JSON` |\n| **Gallery** | Several images. | `JSON` |\n| **Table** | A link to a record of another table. See [Relations](../../guides/relations/). | `TEXT` |\n| **SQL** | A value calculated by PostgreSQL, read-only. See [Calculated columns](../../guides/sql-columns/). | not stored |\n\n## Dropdown and Radio button items\n\nEach item has a **Name**, and can have an ID, an icon and a color. Tables stores the ID of the chosen item. Use the ID in [conditions](../../guides/conditional-formatting/) and in the [API](../api/).\n\n## Auto increment format\n\nThe format builds the value from these parts:\n\n- `Y`: the year, for example `yyyy` gives `2026`.\n- `M`: the month.\n- `#`: the incremented number, padded with zeros to the number of `#`.\n- `{column}`: the value of another column.\n\nFor example, `yyyy####` gives `20260001`, `20260002` and so on.\n\n## Image settings\n\nFor **File**, **Attachments**, **Photo** and **Gallery**, the column form has **Width** and **Height** for images, and **Disproportionate image width and height**.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasslj3Ev61f","url":"https://totaljs.es/docs/tables/7-0/reference/api/","project":"tables","version":"7-0","section":"reference","language":"en","title":"API","summary":"Call Tables from other applications: the request format and the operations on tables and records.","markdown":"---\ntitle: API\nproject: Tables\nversion: 7.0\nsection: reference\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/reference/api/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# API\n\n> Call Tables from other applications: the request format and the operations on tables and records.\n\nOther applications use Tables through one address, `/api/`. Every call is a `POST` request with a JSON body that names the operation in `schema` and its input in `data`. Authenticate with an [API token](../../guides/api-tokens/) in the `x-token` header or the `token` parameter.\n\n```bash\ncurl -X POST https://tables.yourdomain.com/api/ \\\n\t-H 'x-token: YOUR_TOKEN' \\\n\t-H 'content-type: application/json' \\\n\t-d '{ \"schema\": \"Data|list\", \"data\": { \"tableid\": \"t588bi\" } }'\n```\n\n## IDs\n\n- Each table has an ID such as `t588bi`. It is shown in the list of records and in the table settings.\n- Each column has an ID such as `x01`. It is shown next to the column name in the table settings. The columns `id`, `name`, `dtcreated`, `dtupdated`, `createdby` and `updatedby` exist in every table.\n- Each record has an ID such as `JasodS1c561f`.\n\n## Errors\n\nA failed call returns an array of errors, for example:\n\n```json\n[{ \"error\": \"401: Unauthorized\" }]\n```\n\n## Tables\n\n### Tables|list\n\nReturns all tables and views with their settings and columns. No `data`.\n\n### Tables|read\n\nReturns the settings of one table. `data`: `{ \"id\": \"t588bi\" }`. Only tokens with **Super admin privileges** can use it.\n\n## Records\n\n### Data|list\n\nReturns the records of a table or a view, 100 per page.\n\n```json\n{ \"schema\": \"Data|list\", \"data\": { \"tableid\": \"t588bi\" } }\n```\n\nThe answer has `items`, `count`, `page`, `limit` and `pages`. To filter, sort and page, add parameters to the name of the operation, as in an address:\n\n```json\n{ \"schema\": \"Data|list?x03=es&sort=name_desc&limit=20&page=2\", \"data\": { \"tableid\": \"t588bi\" } }\n```\n\n- A column ID with a value filters by that column.\n- `sort` is a column ID followed by `_asc` or `_desc`.\n- `limit` is the number of records per page, up to 100. `page` is the page number.\n\n### Data|read\n\nReturns one record with all its columns. `data`: `{ \"tableid\": \"t118h7\", \"id\": \"JasodS1g561f\" }`. For a relation column `x02`, `x02_id` is the ID of the linked record and `x02` holds its `id` and `name`.\n\n### Data|id\n\nFinds the ID of the first record whose columns have the given values.\n\n```json\n{ \"schema\": \"Data|id\", \"data\": { \"tableid\": \"t4193w\", \"filter\": { \"x01\": \"CH-100\" } } }\n```\n\nReturns `{ \"id\": \"JasooD1c561f\" }`.\n\n### Data|save\n\nCreates a record, or changes it when `data.data.id` is set. A new record must contain all its required columns; to change a record, send only the columns you want to change. For a relation, send the ID of the linked record; for a Dropdown, the ID of the item.\n\n```json\n{\n\t\"schema\": \"Data|save\",\n\t\"data\": {\n\t\t\"tableid\": \"t588bi\",\n\t\t\"data\": { \"name\": \"Example Ltd\", \"x01\": \"hello@example.com\", \"x03\": \"es\" }\n\t}\n}\n```\n\nReturns `{ \"success\": true, \"value\": \"<record ID>\" }`. Saving runs the [hooks](../../guides/hooks/) of the table and, with versioning, keeps the previous version.\n\n### Data|remove\n\nRemoves a record. `data`: `{ \"tableid\": \"t588bi\", \"id\": \"<record ID>\" }`.\n\n### Data|sql\n\nRuns a read-only SQL query and returns the rows. Only tokens with **Super admin privileges** can use it, and only one `SELECT` query is allowed.\n\n```json\n{ \"schema\": \"Data|sql\", \"data\": { \"sql\": \"SELECT name, x04 FROM vt118h7 WHERE x04 > 100\" } }\n```\n\nThe tables and views you can query are described in [Database structure](../database/).\n\n## Views\n\n### Views|list\n\nReturns the views with their ID, table, name and icon. To read the records of a view, call `Data|list` with the ID of the view as `tableid`.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasslp3Mv61f","url":"https://totaljs.es/docs/tables/7-0/reference/hook-and-action-data/","project":"tables","version":"7-0","section":"reference","language":"en","title":"Hook and action data","summary":"The JSON that Tables sends to hooks and actions.","markdown":"---\ntitle: Hook and action data\nproject: Tables\nversion: 7.0\nsection: reference\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/reference/hook-and-action-data/\nupdated: 2026-11-20T06:40:02.622Z\n---\n\n# Hook and action data\n\n> The JSON that Tables sends to hooks and actions.\n\nTables sends JSON in a `POST` request to the addresses of [hooks](../../guides/hooks/) and [actions](../../guides/actions/).\n\n## Hooks\n\n```json\n{\n\t\"tableid\": \"t118h7\",\n\t\"app\": \"Tables\",\n\t\"user\": {\n\t\t\"id\": \"admin\",\n\t\t\"name\": \"Jane Doe\",\n\t\t\"groups\": []\n\t},\n\t\"data\": {\n\t\t\"id\": \"JasptJ1cg61f\",\n\t\t\"name\": \"Desk lamps\",\n\t\t\"rev\": 1,\n\t\t\"dtcreated\": \"2026-11-20T05:55:08.930Z\",\n\t\t\"dtupdated\": null,\n\t\t\"createdby\": \"Jane Doe\",\n\t\t\"updatedby\": null,\n\t\t\"x01\": \"20260006\",\n\t\t\"x02_id\": \"JasodS1c561f\",\n\t\t\"x02\": \"Northwind Supplies\",\n\t\t\"x04\": 10,\n\t\t\"x05\": \"new\"\n\t}\n}\n```\n\n| Field | Content |\n|---|---|\n| `tableid` | The ID of the table. |\n| `app` | The `name` of the app from the config file. |\n| `user` | The user or API token that made the change. |\n| `data` | The record after the change. For a removed record, the record before it was removed. |\n\nIn `data`, each column appears under its ID. For a relation column, `<id>_id` is the ID of the linked record and `<id>` its name. `rev` is the revision number of the record.\n\n## Actions\n\n```json\n{\n\t\"id\": \"JasodS1g561f\",\n\t\"source\": \"detail\",\n\t\"tableid\": \"t118h7\",\n\t\"table\": \"Orders\",\n\t\"action\": \"update\",\n\t\"app\": \"Tables\",\n\t\"data\": { \"id\": \"JasodS1g561f\", \"name\": \"Office chairs\", \"x04\": 1300 },\n\t\"user\": { \"id\": \"admin\", \"name\": \"Jane Doe\", \"sa\": true, \"groups\": [] }\n}\n```\n\n| Field | Content |\n|---|---|\n| `id` | The ID of the record, empty for a new record. |\n| `source` | `detail` when run from the record window, `list` when run from the list. |\n| `tableid`, `table` | The ID and the name of the table. |\n| `action` | `update` for an existing record, `create` for a new one. |\n| `data` | The values of the record. |\n| `user` | The user who ran the action: `id`, `name`, `email`, `sa`, `groups`, `language` and `color`. |\n\n## The answer\n\n- Hooks: Tables does not use the answer.\n- Actions: if the answer is a text, Tables shows it to the user in a message.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:02.622Z"}
{"id":"Jasslo3Kv61f","url":"https://totaljs.es/docs/tables/7-0/reference/database/","project":"tables","version":"7-0","section":"reference","language":"en","title":"Database structure","summary":"How Tables stores your tables in PostgreSQL, for reports and other tools.","markdown":"---\ntitle: Database structure\nproject: Tables\nversion: 7.0\nsection: reference\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/reference/database/\nupdated: 2026-11-20T06:40:02.622Z\n---\n\n# Database structure\n\n> How Tables stores your tables in PostgreSQL, for reports and other tools.\n\nEvery table you design is a real PostgreSQL table, so reporting tools and other applications can read your data directly. All the tables are in the schema set by `schema` in the [configuration](../configuration/).\n\n## Your tables\n\nEach table is stored in a PostgreSQL table named with its ID, for example `t118h7`. Its columns are:\n\n| Column | Content |\n|---|---|\n| `id` | The ID of the record. |\n| `name` | The Name column. |\n| `x01`, `x02`, ... | Your columns, named with their IDs. |\n| `rev` | The revision number, raised on every change. |\n| `permissions` | The visibility of the record. |\n| `createdby`, `dtcreated` | Who created the record and when (UTC). |\n| `updatedby`, `dtupdated` | Who changed it last and when (UTC). |\n| `parentid`, `copyid`, `cloneid` | Internal links between records. |\n\nFor each table, Tables also creates a view named `v` + the ID, for example `vt118h7`. The view adds the names of linked records and the [calculated columns](../../guides/sql-columns/). For reports, read the view:\n\n```sql\nSELECT name, x02 AS customer, x04 AS amount\nFROM vt118h7\nWHERE x05 = 'new'\nORDER BY dtcreated DESC;\n```\n\n## System tables\n\n| Table | Content |\n|---|---|\n| `tbl_table` | The settings and columns of each table. |\n| `tbl_view` | The saved views. |\n| `tbl_backup` | The [versions](../../guides/versions/) of records. |\n| `tbl_removed` | The [removed records](../../guides/removed-records/) of tables that keep them. |\n| `tbl_log` | The [audit log](../../guides/audit-log/). |\n| `tbl_token` | The [API tokens](../../guides/api-tokens/). |\n| `tbl_serial` | The counters of **Auto increment** columns. |\n| `tbl_file` | The uploaded files. |\n| `tbl_config` | Internal settings. |\n\n## Change data safely\n\nRead freely, but change the structure of these tables only in Tables, never with SQL. Tables creates and changes the PostgreSQL tables and views from the settings of your tables.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:02.622Z"}
{"id":"Jassld36v61f","url":"https://totaljs.es/docs/tables/7-0/recipes/customers-and-orders/","project":"tables","version":"7-0","section":"recipes","language":"en","title":"Build a customers and orders database","summary":"Create two linked tables for customers and their orders, with order numbers and statuses.","markdown":"---\ntitle: Build a customers and orders database\nproject: Tables\nversion: 7.0\nsection: recipes\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/recipes/customers-and-orders/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Build a customers and orders database\n\n> Create two linked tables for customers and their orders, with order numbers and statuses.\n\nThis recipe builds a small sales database: a *Customers* table and an *Orders* table where each order belongs to a customer.\n\n## 1. Create the Customers table\n\n**1.** **Options** > **Create table**.\n\n**2.** **Pluralized name** `Customers`, **Singular** `Customer`, **Tab** `Sales`, **Category** `Contacts`.\n\n**3.** Click **Name** in the columns and rename it to `Company`.\n\n**4.** Add the columns:\n- `Email`, type **Email**.\n- `Phone`, type **Phone**.\n- `Country`, type **Dropdown**, with the items `Spain`, `Slovakia` and `Germany`.\n- `Active`, type **Checkbox**.\n\n**5.** Click **SUBMIT**.\n\n## 2. Create the Orders table\n\n**1.** **Options** > **Create table**.\n\n**2.** **Pluralized name** `Orders`, **Singular** `Order`, **Tab** `Sales`, **Category** `Orders`.\n\n**3.** Rename **Name** to `Subject`.\n\n**4.** Add the columns:\n- `Number`, type **Auto increment**, format `yyyy####`.\n- `Customer`, type **Table**, table *Customers*. Check **Required** and **Show link button**, and set **Render items in all related tables** to **As list**.\n- `Order date`, type **Date**.\n- `Amount`, type **Number**, with **Decimals** `2` and **Format** `{0} EUR`.\n- `Status`, type **Dropdown**, with the items `New`, `Paid` and `Shipped`.\n\n**5.** Check **Enable versioning**, so every change of an order is kept.\n\n**6.** Click **SUBMIT**.\n\n## 3. Add data\n\n1. Click **Add** on the *Customers* card and create a few customers.\n2. Click **Add** on the *Orders* card, choose a customer and save.\n\nEach order gets the next number, `20260001`, `20260002` and so on. The detail of a customer lists its orders.\n\n## 4. Make it easier to read\n\n- In the **Formatting** tab of *Orders*, add the condition `row.x04 > 1000` with **Bold** to highlight large orders. Use the ID of your Amount column. See [Conditional formatting](../../guides/conditional-formatting/).\n- Filter the orders by a customer and save the filter as a [view](../../guides/views/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jassli3Cv61f","url":"https://totaljs.es/docs/tables/7-0/recipes/send-orders-to-another-system/","project":"tables","version":"7-0","section":"recipes","language":"en","title":"Send new orders to another system","summary":"Use a hook to post every new order to the endpoint of another application.","markdown":"---\ntitle: Send new orders to another system\nproject: Tables\nversion: 7.0\nsection: recipes\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/recipes/send-orders-to-another-system/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Send new orders to another system\n\n> Use a hook to post every new order to the endpoint of another application.\n\nThis recipe sends each new order to another application, for example an accounting system, as soon as it is saved.\n\n## 1. Prepare the endpoint\n\nThe other system needs an address that accepts a `POST` request with JSON, for example `https://erp.example.com/api/orders/`. It receives the format described in [Hook and action data](../../reference/hook-and-action-data/).\n\nA minimal receiver in Node.js that logs the order:\n\n```js\nconst http = require('http');\n\nhttp.createServer(function(req, res) {\n\tlet body = '';\n\treq.on('data', chunk => body += chunk);\n\treq.on('end', function() {\n\t\tconst hook = JSON.parse(body);\n\t\tconsole.log('New order', hook.data.name, 'for', hook.data.x02);\n\t\tres.end('OK');\n\t});\n}).listen(9000);\n```\n\n## 2. Set the hook\n\n1. Open the settings of the *Orders* table.\n2. In the **Hooks** tab, enter the address in **Create**.\n3. Click **SUBMIT**.\n\n## 3. Try it\n\nCreate an order. The other system receives the order with its number, customer, amount and status, and the name of the user who created it.\n\nTo also send changes, enter the same address in **Update**. The receiver can tell new orders from changes by `dtupdated`, which is empty for a new record.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasslf38v61f","url":"https://totaljs.es/docs/tables/7-0/recipes/read-data-from-a-script/","project":"tables","version":"7-0","section":"recipes","language":"en","title":"Read and write data from a script","summary":"Use an API token to list, find and create records from a shell script or another application.","markdown":"---\ntitle: Read and write data from a script\nproject: Tables\nversion: 7.0\nsection: recipes\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/recipes/read-data-from-a-script/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Read and write data from a script\n\n> Use an API token to list, find and create records from a shell script or another application.\n\nThis recipe uses the [API](../../reference/api/) with `curl`. The same requests work from any language.\n\n## 1. Create a token\n\nCreate an [API token](../../guides/api-tokens/) named after your script, and copy it. In the examples, it is in the variable `TOKEN`, and the table IDs are those of your own tables:\n\n```bash\nTOKEN='paste-your-token-here'\nURL='https://tables.yourdomain.com/api/'\n```\n\n## 2. List customers from Spain\n\n```bash\ncurl -s -X POST \"$URL\" -H \"x-token: $TOKEN\" -H 'content-type: application/json' \\\n\t-d '{ \"schema\": \"Data|list?x03=es&sort=name_asc\", \"data\": { \"tableid\": \"t588bi\" } }'\n```\n\n## 3. Find a record by a value\n\n```bash\ncurl -s -X POST \"$URL\" -H \"x-token: $TOKEN\" -H 'content-type: application/json' \\\n\t-d '{ \"schema\": \"Data|id\", \"data\": { \"tableid\": \"t4193w\", \"filter\": { \"x01\": \"CH-100\" } } }'\n```\n\n## 4. Create a record\n\n```bash\ncurl -s -X POST \"$URL\" -H \"x-token: $TOKEN\" -H 'content-type: application/json' \\\n\t-d '{ \"schema\": \"Data|save\", \"data\": { \"tableid\": \"t588bi\", \"data\": { \"name\": \"Example Ltd\", \"x01\": \"hello@example.com\" } } }'\n```\n\nThe answer has the ID of the new record in `value`.\n\n## 5. Update it\n\nSend the ID in `data.data.id` and only the columns to change:\n\n```bash\ncurl -s -X POST \"$URL\" -H \"x-token: $TOKEN\" -H 'content-type: application/json' \\\n\t-d '{ \"schema\": \"Data|save\", \"data\": { \"tableid\": \"t588bi\", \"data\": { \"id\": \"RECORD_ID\", \"x04\": false } } }'\n```\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"Jasslh3Av61f","url":"https://totaljs.es/docs/tables/7-0/recipes/sales-report-with-sql/","project":"tables","version":"7-0","section":"recipes","language":"en","title":"Make a sales report with SQL","summary":"Sum the orders of each customer with a SQL query on the view of the Orders table.","markdown":"---\ntitle: Make a sales report with SQL\nproject: Tables\nversion: 7.0\nsection: recipes\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/recipes/sales-report-with-sql/\nupdated: 2026-11-20T06:39:57.622Z\n---\n\n# Make a sales report with SQL\n\n> Sum the orders of each customer with a SQL query on the view of the Orders table.\n\nBecause every table is a PostgreSQL table, you can make reports with SQL. This recipe sums the orders of each customer.\n\n## The query\n\nThe view `v` + table ID has the name of the linked customer in the relation column. With *Orders* = `t118h7`, `x02` = Customer and `x04` = Amount:\n\n```sql\nSELECT x02 AS customer, COUNT(*) AS orders, SUM(x04) AS total\nFROM vt118h7\nGROUP BY x02\nORDER BY total DESC;\n```\n\n## Run it\n\n- In any PostgreSQL client connected to the database of Tables, for example `psql` or a reporting tool.\n- Or through the API with a token that has **Super admin privileges**:\n\n```bash\ncurl -s -X POST https://tables.yourdomain.com/api/ -H 'x-token: YOUR_TOKEN' -H 'content-type: application/json' \\\n\t-d '{ \"schema\": \"Data|sql\", \"data\": { \"sql\": \"SELECT x02 AS customer, SUM(x04) AS total FROM vt118h7 GROUP BY x02\" } }'\n```\n\nThe structure of the tables and views is in [Database structure](../../reference/database/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:57.622Z"}
{"id":"JasskI1vv60f","url":"https://totaljs.es/docs/tables/7-0/faq/installation-and-sign-in/","project":"tables","version":"7-0","section":"faq","language":"en","title":"Installation and sign-in","summary":"Answers about installing Tables and signing in.","markdown":"---\ntitle: Installation and sign-in\nproject: Tables\nversion: 7.0\nsection: faq\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/faq/installation-and-sign-in/\nupdated: 2026-11-20T06:39:52.622Z\n---\n\n# Installation and sign-in\n\n> Answers about installing Tables and signing in.\n\n## Where do I find the first password?\n\nOn the sign-in page, in the **Default account** box, until the first successful sign-in. See [First sign-in](../../guides/first-sign-in/).\n\n## I lost the password. How do I get in?\n\n1. Stop Tables.\n2. In the folder of the app, remove the file `databases/memorize_account.json`.\n3. Start Tables. It creates a new account and shows it on the sign-in page.\n\nYour tables and records are not touched; they are in PostgreSQL.\n\n## Do I need to create the tables in PostgreSQL?\n\nNo. Create only an empty database. Tables creates its system tables at the first start, and a PostgreSQL table for each table you design.\n\n## Which port does Tables use?\n\n`npm start` uses port 8000. Start it with `node index.js` and another number to use another port. See [Install Tables](../../guides/install/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:52.622Z"}
{"id":"JasskK1xv60f","url":"https://totaljs.es/docs/tables/7-0/faq/tables-and-data/","project":"tables","version":"7-0","section":"faq","language":"en","title":"Tables and data","summary":"Answers about designing tables, changing columns and keeping data.","markdown":"---\ntitle: Tables and data\nproject: Tables\nversion: 7.0\nsection: faq\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/faq/tables-and-data/\nupdated: 2026-11-20T06:39:52.622Z\n---\n\n# Tables and data\n\n> Answers about designing tables, changing columns and keeping data.\n\n## Can I change the type of a column?\n\nOnly to a type that stores the same kind of data, for example from **Text** to **Email** or **Multiline**. To change a text into a number, add a new Number column and copy the values.\n\n## Where is my data?\n\nIn PostgreSQL. Each table is a PostgreSQL table named with its ID, for example `t118h7`. See [Database structure](../../reference/database/).\n\n## How do I back up Tables?\n\nBack up the PostgreSQL database, for example with `pg_dump`, and keep a copy of the `config` file. See [Run Tables in production](../../guides/production/).\n\n## Can I undo a change to a record?\n\nYes, if the table has **Enable versioning**. Open the record, choose **More** > **Versions** and click the version to restore. See [Versions of a record](../../guides/versions/).\n\n## Can I get back a removed record?\n\nOnly if the table has **Stores deleted records for manual recovery or review**. The copy is in the database table `tbl_removed`. See [Removed records](../../guides/removed-records/).\n\n## How do I move my tables to another server?\n\nExport the schema on the first server and import it on the second. Then move the records with CSV files or by copying the database. See [Export, import and print the schema](../../guides/schema-files/).\n\n## Why is a calculated column empty?\n\nCheck the SQL expression of the column. It must refer to the other columns with `col.` and their IDs, for example `col.x02 * col.x03`. See [Calculated columns](../../guides/sql-columns/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:52.622Z"}
{"id":"Jassre1uN61f","url":"https://totaljs.es/docs/tables/7-0/development/extensions/","project":"tables","version":"7-0","section":"development","language":"en","title":"Extensions","summary":"Add your own server code and buttons to Tables with extension files.","markdown":"---\ntitle: Extensions\nproject: Tables\nversion: 7.0\nsection: development\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/development/extensions/\nupdated: 2026-11-20T06:39:52.622Z\n---\n\n# Extensions\n\n> Add your own server code and buttons to Tables with extension files.\n\nAn extension is an HTML file that adds your own code to Tables: server code, for example an action that an [action button](../../guides/actions/) calls, and browser code, for example a button in the record window.\n\n## Where extensions live\n\n1. Create a folder named `extensions` in the folder of the app.\n2. Put your extension files in it, for example `extensions/orders.html`.\n3. Restart Tables. It loads every `.html` file of the folder at the start.\n\nFiles whose name contains `-bk` or `_bk` are skipped, so you can keep a disabled copy next to the active one.\n\n## The parts of an extension file\n\nAn extension has up to two parts:\n\n- `<script total>`: server code. It runs once in Tables at the start, with the full Total.js 5 API, for example `NEWACTION()` and `ON()`.\n- `<script>`: browser code. Tables adds it to the page of every user.\n\n```html\n<script total>\n\t// Server: an action that the browser part calls\n\tNEWACTION('Orders|hello', {\n\t\troute: '+API ?',\n\t\taction: function($, model) {\n\t\t\t$.callback('Hello ' + (model.name || ''));\n\t\t}\n\t});\n</script>\n\n<script>\n\t// Browser: a button in the detail of every record\n\tON('detail', function(meta) {\n\t\tmeta.columns.push({ type: 'custom', html: '<button class=\"exec\" data-exec=\"?/sayhello\">Say hello</button>' });\n\t\tmeta.plugin.sayhello = function() {\n\t\t\tlet payload = meta.plugin.collect();\n\t\t\tmeta.plugin.tapi('Orders|hello', payload, function(response) {\n\t\t\t\talert(response);\n\t\t\t});\n\t\t};\n\t});\n</script>\n```\n\nThe button appears at the end of the fields of each record. Clicking it sends the values of the record to the server action, which answers with a text:\n\n![A record with the Say hello button added by an extension](/files/JasskG1uv61f.webp)\n\n## React to saved records\n\nServer code can listen to the operations of Tables. Put `@` before the name of the operation:\n\n```html\n<script total>\n\tON('@Data|save', function($) {\n\t\tlet model = $.payload;\n\t\tif (model.tableid === 't118h7') {\n\t\t\t// an order was saved\n\t\t}\n\t});\n</script>\n```\n\n## Call your action from an action button\n\nA server action of an extension can be the **Endpoint** of an [action](../../guides/actions/): enter its name, for example `Orders|approve`, instead of an address. The action receives the data described in [Hook and action data](../../reference/hook-and-action-data/), and the text it returns is shown to the user.\n\n```html\n<script total>\n\tNEWACTION('Orders|approve', {\n\t\taction: function($, model) {\n\t\t\t// model.id, model.data, model.user ...\n\t\t\t$.callback('Order approved');\n\t\t}\n\t});\n</script>\n```\n\nAll the events and helpers are in [Extension reference](../extension-reference/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:52.622Z"}
{"id":"JassrR1gN61f","url":"https://totaljs.es/docs/tables/7-0/development/extension-reference/","project":"tables","version":"7-0","section":"development","language":"en","title":"Extension reference","summary":"The browser events, the helpers of the record window and the server events that extensions use.","markdown":"---\ntitle: Extension reference\nproject: Tables\nversion: 7.0\nsection: development\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/development/extension-reference/\nupdated: 2026-11-20T06:51:57.969Z\n---\n\n# Extension reference\n\n> The browser events, the helpers of the record window and the server events that extensions use.\n\nExtensions use these events and helpers. Browser events are registered in the `<script>` part of an [extension](../extensions/), server events in the `<script total>` part.\n\nEntries of type **event** are functions that you register and Tables calls. Entries of type **method** are functions that Tables provides.\n\n## API\n\n### ON('detail', function(meta) {})\n\nType: `event`\n\nRuns in the browser each time a record window opens.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `meta.table` | `Object` | yes |  | The settings of the table: `id`, `name`, `columns` and the others. |\n| `meta.columns` | `Array` | yes |  | The fields of the form. Push `{ type: 'custom', html: '...' }` to add your own HTML. |\n| `meta.plugin` | `Object` | yes |  | The record window. Functions you add to it can be called from your HTML with `class=\"exec\" data-exec=\"?/name\"`. |\n| `meta.response` | `Object` | yes |  | The record as read from the server. |\n| `meta.toolbar` | `Array` | yes |  | The buttons of the toolbar of the window. |\n| `meta.actions` | `Array` | yes |  | The items of the Actions menu of the window. |\n\nUse it to add fields or buttons to the detail of a record. Check `meta.table.id` to change only one table.\n\nExample: Add a note at the end of the orders\n```js\nON('detail', function(meta) {\n\tif (meta.table.id === 't118h7')\n\t\tmeta.columns.push({ type: 'custom', html: '<p>Check the stock before you ship.</p>' });\n});\n```\n\n### ON('listing', function(meta) {})\n\nType: `event`\n\nRuns in the browser when the list of records of a table is prepared.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `meta.table` | `Object` | yes |  | The settings of the table. |\n| `meta.columns` | `Array` | yes |  | The columns of the list. |\n| `meta.toolbar` | `Array` | yes |  | The buttons of the toolbar of the list. |\n| `meta.element` | `jQuery` | yes |  | The element of the list window. |\n| `meta.plugin` | `Object` | yes |  | The list window. |\n| `meta.links` | `Array` | yes |  | The tables that link to this table and where the user can create records. |\n| `meta.lists` | `Array` | yes |  | The tables that link to this table and that the user can read. |\n\nUse it to inspect or change the list before it is shown.\n\nExample: Log the columns of each list\n```js\nON('listing', function(meta) {\n\tconsole.log(meta.table.name, meta.columns.length);\n});\n```\n\n### ON('actions', function(meta) {})\n\nType: `event`\n\nRuns in the browser when a user opens the Actions menu of a list.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `meta.actions` | `Array` | yes |  | The items of the menu. |\n| `meta.table` | `Object` | yes |  | The settings of the table. |\n| `meta.items` | `Array` | yes |  | The records on the current page. |\n| `meta.plugin` | `Object` | yes |  | The list window. |\n\nUse it to inspect or change the items of the menu before it is shown.\n\nExample: Log the number of items\n```js\nON('actions', function(meta) {\n\tconsole.log(meta.table.name, meta.actions.length);\n});\n```\n\n### meta.plugin.collect()\n\nType: `method`\n\nReturns the current values of the record window.\n\nAvailable in the `detail` event. The object has the `id`, the `name` and each column under its ID. A relation column holds the ID of the linked record.\n\nExample: Read the amount of an order\n```js\nlet values = meta.plugin.collect();\nconsole.log(values.x04);\n```\n\n### meta.plugin.tapi(name, data, callback)\n\nType: `method`\n\nCalls a server action of Tables or of an extension.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `name` | `String` | yes |  | The name of the action, for example `Orders\\|hello`. |\n| `data` | `Object` | yes |  | The input of the action. |\n| `callback` | `Function` | yes |  | `function(response)` with the answer of the action. |\n\nThe call is made with the session of the signed-in user. The action needs a route such as `route: '+API ?'` to be callable from the browser.\n\nExample: Send the record to a server action\n```js\nmeta.plugin.tapi('Orders|hello', meta.plugin.collect(), function(response) {\n\talert(response);\n});\n```\n\n### ON('@Data|save', function($) {})\n\nType: `event`\n\nRuns on the server each time an operation of Tables is called.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `$.payload` | `Object` | yes |  | The input of the operation. For `Data\\|save`: `tableid` and `data`. |\n| `$.user` | `Object` | yes |  | The user or API token that called the operation. |\n\nUse the name of the operation after `@`, for example `@Data|save` for every saved record. `$.payload` is the input of the operation and `$.user` the user.\n\nExample: Log every saved order\n```js\nON('@Data|save', function($) {\n\tif ($.payload.tableid === 't118h7')\n\t\tconsole.log('Order saved by', $.user.name);\n});\n```\n","entries":[{"type":"event","name":"ON('detail')","signature":"ON('detail', function(meta) {})","since":"","deprecated":false},{"type":"event","name":"ON('listing')","signature":"ON('listing', function(meta) {})","since":"","deprecated":false},{"type":"event","name":"ON('actions')","signature":"ON('actions', function(meta) {})","since":"","deprecated":false},{"type":"method","name":"meta.plugin.collect()","signature":"meta.plugin.collect()","since":"","deprecated":false},{"type":"method","name":"meta.plugin.tapi()","signature":"meta.plugin.tapi(name, data, callback)","since":"","deprecated":false},{"type":"event","name":"ON('@<action>')","signature":"ON('@Data|save', function($) {})","since":"","deprecated":false}],"license":"Total.js Enterprise","updated":"2026-11-20T06:51:57.969Z"}
{"id":"JasskC1sv61f","url":"https://totaljs.es/docs/tables/7-0/changelog/changelog/","project":"tables","version":"7-0","section":"changelog","language":"en","title":"Changelog","summary":"The changes in each release of Total.js Tables.","markdown":"---\ntitle: Changelog\nproject: Tables\nversion: 7.0\nsection: changelog\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/tables/7-0/changelog/changelog/\nupdated: 2026-11-20T06:39:52.622Z\n---\n\n# Changelog\n\n> The changes in each release of Total.js Tables.\n\n## Version 7\n\n- fixed authentication bypass on the `/pipe/` endpoint (disabled when `pipetoken` is not configured)\n- hardened the `Data|sql` query guard (blocks statement stacking, data-modifying CTEs, `SELECT INTO`, row locks and server-side file/large-object/network functions)\n- fixed in-memory cache update when renaming a category or a tab\n- fixed the create hook in the `Data|clone` action\n- updated jComponent library\n- added a new `compare` window for importing schemas\n- fixed autocomplete, it doesn't offer values from the copies of records\n- improved synchronization of the database schema (only the changed table and dependent views are synchronized, in one transaction)\n- added automatic indexes for relations, `parentid` and default sorting\n- fixed linked columns when a table contains several relations to the same table\n- fixed synchronization of the database when a column type or custom SQL is changed\n\n## Version 6\n\n- fixed displaying `name` in the related tables\n- fixed `secret` type\n- improved dynamic formatting\n- added support for dynamic `row` formatting\n- added a table option recoverable that creates a copy of the data in an independent table when a record is removed\n- added support for dynamic `format` in the column settings\n- improved dynamic formatting\n\n## Version 5\n\n- fixed showing columns according permissions in the table list settings\n- added a new column formatting options called `Render`\n- added `unsaved` option for the tables\n- updated jComponent library\n- added better formatting for phone numbers and email addresses\n- added `Paste copied data` functionality in details\n- added `Offline` UI component\n- added `Rename categry` functionality\n- improved UI\n- improved `datepicker` handling\n- fixed `prompt` of unsaved form before close\n\n## Version 4\n\n- fixed applying of decimals\n- added possibility to import data with the schema\n- fixed cloning\n- added `Data|sql` action\n- added new a global event `listing`\n- fixed `summary` field in views\n- fixed permissions for views\n- fixed refreshing of cache\n- fixed changing groups for the superadmin\n- fixed permissions\n- added custom positioning for view columns\n- updated UI components\n- fixed empty radio buttons\n- fixed importing schema\n- fixed `actions` event\n- fixed dynamic expressions\n- updated font icons\n- improved view editing (added drag&drop functionality)\n\n## Version 3\n\n- fixed import CSV\n- added `monospace` style\n- fixed removing views and tables\n- added text transformations\n- fixed arguments in the `contextmenu` event (UI)\n- improved serial type by adding support for custom date formatting\n- added a possibility to disable column cloning\n- fixed default column values\n- improved UI\n- added a new UI component `unsaved`\n- improved refreshing tables (added recount rows)\n- updated slovak language\n- added support to allow auto-complete for text columns\n- fixed width of columns in the list\n- added align\n- added better error handling to API\n- updated Total.js icons\n\n## Version 2\n\n- fixed auditlogs\n- updated UI components\n- fixed autoassign user identifiers\n- fixed removing of zombie-linked columns\n- added confirm dialog twice for all remove operations\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:39:52.622Z"}
