Tablis User Guide

Tablis removes the need for application programming. Building an application comes down to describing the task: you define the data model, the processing rules and the output format. The builder focuses on the essentials and keeps evolving.

Tablis is an on-premise product installed on the customer's server. A demo environment is available — request a demo.

Installation and system components

After installation you get a database that already contains built-in objects such as User, Role and Query. Tablis knows how to handle them: a Role defines access to every object, a Query selects data, and so on. Everything else you teach Tablis yourself. The user created with the database has the database's name and administrator rights. New users are offered an introductory video and interactive tutorials — we recommend completing them.

Personal account

In the demo environment you get a personal account where you create and open databases. It is itself a Tablis application. Your first database is named after the name you chose when requesting access by email, or after your email name (or a generated name such as g9999) when signing in with Yandex ID. The account is available from the top-right menu.

Signing in

You sign in once and move freely between the personal account and your databases. With email sign-up, the account and your first database share one password.

Setting and resetting passwords

Enter the user name and database name and click the password reminder link. With the database name left empty, the personal account password is reset.

Tablis application architecture

An application is built in four stages:

  1. Structure editor — define the data structure as linked boxes.
  2. Data navigator — import, browse and edit data much like in Excel.
  3. Query builder — rules for selecting, creating and changing data.
  4. Form builder / template engine — convenient workplaces for users.

Built-in workplaces

Five universal forms plus a file manager: the structure editor (Structure menu), the list of tables (Tables menu), the table view, the record edit form, the report form, and a directory manager for page templates.

The core principle: a Tablis developer needs no programming language or database theory — Excel-user skills are enough, plus basic functions (SUM, AVERAGE) and the Tablis keywords. Much of Tablis — Users, Roles, Access objects, Queries — is built in Tablis itself. You may extend these entities, but never delete them or their attributes.

Data model

The data model consists of linked tables (also called terms, types or objects). You define terms such as Client, Contract, Phone, Meeting or Category and link them; the system then aggregates data for navigation and reporting by itself. Any hierarchy can be built, as in a relational database:

  • a Client has a Phone (simple attribute);
  • a Client has a Category taken from a reference table;
  • a Client stores its Meetings (subordinate array);
  • a Contract refers to its Client (one client — many contracts).

Simple tables can be added from the Tables menu: enter a name, choose the first column's type and optionally mark it unique, then add columns with "+" (optionally as lookups). Creating and editing tables requires the admin role.

Structure editor

For complex schemas use the Structure editor (Structure menu). It already contains many objects, since Tablis is largely written in Tablis and can be reworked to fit your needs. Each object appears once, at its first mention; hovering shows arrows to linked objects.

Base data types

Every term is created here with a name and a base type, which tells the system how to display and process values:

Base type Description
SHORT Short string (up to 127 characters)
CHARS String of unlimited length
MEMO Multi-line text
DATE Date
DATETIME Date and time
HTML HTML text (not escaped in reports)
FILE File
NUMBER Integer
SIGNED Decimal number
BUTTON Action (button) on an object
BOOLEAN Yes / No
PWD Password, shown as "******"
GRANT System object (any registered type or attribute)
REPORT_COLUMN Query column (any registered type or attribute)
PATH File path in the system

Creating a term

Enter a name (e.g. "Client"), choose a base type and click Create. The table appears in the Tables menu at once, and records are added with "+". The first column is the object itself; the others are its properties.

Properties and links

Select a term and add:

  • an existing property (e.g. Phone) from the drop-down;
  • a new property (e.g. Meetings, type DATETIME) via "add new";
  • a reference to a lookup table (e.g. Category) via "add new" with the reference box ticked — the Category table is created and the client form gets a picker;
  • a reference to an existing term (e.g. Contracts → Client), shown with the "—>" prefix, meaning a link to a record rather than free text.

Changes take effect immediately.

Subordinate tables

If a property has its own properties, it becomes an array. Give Meeting a Note and a Status reference, and each client gets a table of meetings, opened in one click from the client row. So there are three kinds of fields: simple properties, references and subordinate tables. Several references to the same table (e.g. task author and assignee, both users) are distinguished by aliases. Even at this level a schema is hard to follow in Excel or Airtable, while Tablis shows it whole.

Ordering and deleting attributes

Attributes are deleted with "X" and moved up with "^"; their order defines the column order in tables. You can also jump to a reference's lookup table and set the reference alias here.

Tables (reference lists)

All data is shown as tables (Tables menu); roles can restrict which tables a user sees. Click the leftmost column to edit a record. Every record has a unique numeric ID, useful when configuring the system. The Links button shows everything that refers to a record. Deletion asks for confirmation and is blocked if the record is referenced elsewhere.

Data validation

Mark an attribute as mandatory with the "!" button in the Structure editor. An invalid form is not saved: the user sees a warning and stays in edit mode.

Calculated attributes

The Default value field pre-fills an attribute in new records and accepts keywords. For a reference it offers a drop-down — e.g. every new client gets the "Lead" category, which the user can change. A default of the wrong type is ignored.

Searching tables and lists

Tables show the first 20 records; use the header filters (click the header or the funnel icon). Dates and numbers support ranges, text supports masks:

Field Condition
Client starts with "Kri" (case-insensitive)
Phone ends with 4041
Card from 4000 to 5000
Note contains "gift"
Contract non-empty
Date 1st of this month to [YESTERDAY]
Birthday [TODAY]
Source empty

% means non-empty, !% means empty; a leading ! negates any condition (!%gift%). Dates can be shortened (12, 12.6, 12.12.21); ".", "," and "/" are accepted as separators.

Searching drop-down lists

Drop-downs show up to 80 entries; for more, type a condition in the search field next to the list and press Enter. Separate masks with a slash to search other columns (/%red%). A "+" button lets permitted users add a new value on the spot.

Duplicating and ordering records

The Duplicate button copies an object with all attributes and arrays. Records in arrays keep their order and can be deleted ("X") or moved up ("^").

Data export and import

Exporting and importing structure and data

Structures and data can be exported, moved to another Tablis database, or prepared from third-party systems. The file describes the structure first, then the data:

ID_типа:имя_типа:базовый_тип_типа;[имя_реквизита:базовый_тип_реквизита; | ID_типа_ссылочного_реквизита;, …]
ID_типа_записи:[ID_записи];значение_записи;[реквизит;, …]

Open a table, filter if needed and click "Экспорт BKI" (BKI export) — the file includes subordinate data and linked lookups. "Импорт BKI" (BKI import) loads it into any table. Use it to package and sell your templates, move hierarchical reference tables, or import a client's meeting history.

On import Tablis reuses existing types matched by "term:base type", resolves ID conflicts and adds missing attributes, but stops if an attribute slot is taken by a different name or type, or a record ID is taken by a different value. Line breaks and semicolons in values are handled correctly.

Simplified import of flat tables

For a flat table, prepare a plain list of rows with the word DATA on the first line and load it into the target table with "Импорт BKI".

Queries (reports)

The report builder lets you pick the columns you need without thinking about joins, and can express any SQL construct, including subqueries, without SQL knowledge.

Example: clients with a contract and meetings this month (Client - Category - Phone - Date - Meeting topic) with a total count. In Tables → Report create the report, add Client and set Totals → COUNT; add the linked columns (the list narrows to fields linked to clients); add a hidden Contract column with a "not empty" condition; set the meeting date from the 1st to today. It takes about two minutes.

Aggregation in reports

Reports support sum, count, min, max and average, plus sorting and output formats (e.g. DATE instead of DATETIME).

Interactive reports

With the Interactive option, objects in the report become links to their edit forms.

Filtering reports and exporting to MS Excel

Finished reports can be filtered (header or funnel icon) and are re-queried from the server. For security, only fields with a "Name in report" can be filtered, so users cannot override the author's filters. Any report exports to MS Excel in one click.

Using reports in the Structure editor

Reports can calculate default values. Example: fill in the manager when a client is created. Link Manager to User and Client, create a report "ID_менеджера" that filters by [USER] and returns the manager via abn_ID (see Keywords, functions and constants), and put the report name into the Default value of the Client's "—> Manager" attribute.

Report columns in detail

Name in report — the column title. Formula — a calculated expression or alias; the "Calculated" column accepts any SQL operators and functions and can refer to other columns by alias. An expression in square brackets calls another report (see Nested queries).

Query builder fields

  • Value (from/to) — range or mask, with the rules from Searching tables and lists; keywords and other columns ([alias]) allowed.
  • Function — AVG, COUNT, MAX, MIN, SUM; grouping is by all non-aggregated fields.
  • Hide — not shown, but usable for calculation, filtering and sorting.
  • Format — output format; HTML is not escaped (other types are, to prevent script injection).
  • Sort — order and direction; negative means descending.
  • Total — aggregate for the total row.
  • HAVING — range or mask applied after aggregation.
  • SET — value assigned to the column (see Data-changing queries).

Nested queries in reports

A column can call another report. For example, a PAID_TILL report uses CARD_NO from the parent report to find clients whose paid period ends soon, ignoring those who prepaid. Combining several helper reports is a typical way to build trial-balance statements.

Calling a report with parameters

Filters can be passed to a report:

FR_MANAGER=Света&FR_DATE=09/09/2016

FR_<COLUMN> sets "Value (from)", TO_<COLUMN> sets "Value (to)"; only columns with a "Name in report" accept them. Pass them from your own HTML form (see Tablis web page generation).

Data-changing queries

Any report can change data in bulk across several tables: update, delete, or create records linked to the selected objects. First the report shows what will change; the user then confirms.

Updating values

The SET column defines the new value (quoted), and may use aliases and SQL functions such as CONCAT() and IFNULL — e.g. append a phone number to a client's note. "Execute" applies the changes; an object appearing in several rows changes once.

Creating records

Example: schedule a meeting with every "Lead" client. When a column has both a filter and SET, the filter means "matches or empty", so re-running the report creates no duplicates.

Deleting records

Assign "" to delete records together with their subordinate data. Note: links are not checked, so referenced lookup values can be deleted too.

A single query can update any fields across any number of linked tables — a capability that sets Tablis apart.

Executing changes without confirmation

The confirmed flag (POST only) runs a change immediately, which lets you build one-click actions on your pages.

Using EXECUTE for immediate execution

A query with the EXECUTE parameter runs on any POST or GET call — useful for automatic changes such as logging when a workplace opens. Older databases can add the parameter to the Query table manually.

Example: removing duplicates

A main query lists all movies; a nested query finds the minimum ID per movie and director. The record with the minimum ID is the original, the rest are deleted. The report can be put in a menu or run on a schedule with confirmed.

LIMIT in Tablis reports

The LIMIT parameter works like SQL LIMIT (row count, optionally with offset for paging). It can be passed via POST or GET but cannot exceed the value set in the report.

Exporting reports as JSON

https://tablis.ru/{db}/report/{id}?JSON

Variants: JSON_DATA (data only, keyed by column names), JSON_KV (key-value pairs, e.g. for Bubble.io or the Tablis universal loader) and JSON_CR (back end for Creatium, with basic HTTP authentication).

Queries to external sources

Reports can call websites and APIs over HTTP. Put a URL template in the report's URL field with fields in square brackets ([phone], [name]); the abn_URL function returns the response for each row — e.g. an SMS provider's message ID. The response can be saved via SET. Fields used in the template must be to the left of the abn_URL column.

Saving JSON responses

Access response keys with CURL.{key} (CURL. stores the whole JSON); quote it in SET fields.

BUTTON attributes

A BUTTON attribute appears on the edit form as a button that opens a custom HTML form, with [ID] and [VAL] replaced by the object's ID and value. Attach a report and you get a workplace for any operation on the object and its related data.

User permissions

Access is controlled by roles, down to individual fields and values. Users are in Tables → User; each has a Role listing the types it may view or edit. For example, the Firm column can be hidden from the Manager role, and a read-only Article limited by the mask 2%. Access levels are in Tables → Access; roles can also allow or forbid export and bulk deletion.

Guest (anonymous) access

Create a user guest with the guest role. A guest sees only the objects you add to the role and the page you send them to. If you see Invalid token for GUEST, clear the user's Token field.

Access by secret word

A value in the user's Secret field, passed as a parameter, signs the user in:

https://tablis.ru/{db}?secret=xxxxxxxxxxxx

It is stored in plain text, so use it only for simple demo access.

User files

The Files menu is available to the user named after the database and to admin. Files uploaded through edit forms (edit_obj) are stored in download in encrypted folders (up to 1,000 files each), with names derived from the file ID and the database name. Files uploaded through the Files menu are stored as is, so give sensitive ones a hashed name.

Tablis web page generation

The standard interface is built from universal forms: HTML templates with insertion points filled from reports. Forms are embedded in main.html, which the administrator can edit; custom forms can be used inside it or standalone. Each page has the address:

https://tablis.ru/{db}/{action}/{id}

— database, form (template) name and object ID, e.g. https://tablis.ru/test/edit_obj/776.

Template with the standard HTML forms

All standard forms can be edited in Files → templates; changes affect only that database.

Data blocks

<!-- Begin: Store --> … <!-- End: Store -->

Tablis runs the report matching each block and fills the {…} insertion points, repeating the block per row. A block without data is skipped; a block without insertion points is shown once. Add spaces inside braces to protect JavaScript template literals:

const name = 'Alex';
const hello = `Hello ${ name }`;

{_parent_.GOOD_ID} reads a value from a parent block; {_request_.GOOD_ID} reads a request parameter or cookie. Service reports (e.g. for &Top_Menu) start with "&" and are hidden.

Including files

<!-- File: a --> includes the file named by {action} (default info.html); <!-- File: xxx --> includes a specific file from templates. Always omit the .html extension. Included files are processed too.

Example: the Warehouse form

store.html shows stock levels. Its <form> submits to itself (action="/{_global_.z}/store") with filters such as FR_CODE (barcode), applied as in Calling a report with parameters. The Store block repeats for each row of the Store report; the nested MyBar block reads {_parent_.GOOD_ID} and links to an API command that records a sale (see the Tablis Developer Guide. API). By chaining such workplaces you can model business processes of any complexity.

Page build information

<!--Elapsed--> shows the user, query count, query time, total build time and time offset, e.g. [username] 7 / 0.0023 / 0.0102 (3600).

Keywords, functions and constants

Keywords

Keyword Meaning
[TODAY], [NOW] today; current date and time
[YESTERDAY], [TOMORROW] yesterday; tomorrow
[MONTH_AGO], [MONTH_PLUS] one month back; one month ahead
[USER_ID], [USER] signed-in user's ID and name
[TSHIFT] workstation time offset from the server
! negation; !% means empty

Also: [REMOTE_HOST], [HTTP_USER_AGENT], [HTTP_REFERER], [HTTP_HOST], [REQUEST_URI].

Built-in functions

Function Purpose
abn_DATE2STR, abn_NUM2STR date or number as words
abn_RUB2STR amount as words (roubles and kopecks)
abn_ID, abn_TYP, abn_REQ, abn_UP, abn_ORD object ID, type ID, attribute type ID, parent ID, position
abn_ROWNUM report row number
abn_URL result of a URL request

The full list is in Tables → Function.

Global constants

Available in templates: {_global_.action}, {_global_.id}, {_global_.role}, {_global_.role_id}, {_global_.token}, {_global_.uri}, {_global_.USER}, {_global_.USER_ID} and {_global_.z} (database name).

POST and GET parameters

_request_.user is replaced with the user request parameter in query filters and formulas.

Tablis Developer Guide. API

Everything available in the interface is available through the API — structure, data, queries and permissions — with the same authorization.

From a server, use the api/ prefix and a token from the auth command, sent as X-Authorization: {token}, or Basic HTTP Authentication:

/api/{имя базы}/{cmd}[/{id объекта}][?{параметры}]

From a browser, the cookie token is used; add JSON:

/{имя базы}/{cmd}[/{id объекта}]?JSON[&{параметры}]

_d_* commands change the structure (DDL), _m_* commands change data (DML). Changes are sent as POST with the _xsrf token. The full command list is in the Tablis Developer Guide. API.

Ready to move your processes to Tablis?

We will show the platform on your own tasks or prepare a quote for the on-premise edition.