# Table

## **Initial setting:**

**Model** - data model for the table.

**Endpoint** - data source for the table.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2Fqoy9D4YBStZRxOk0Cweq%2Fimage.png?alt=media\&token=2aa8b07c-c233-4cd2-a740-aa5af7417a0c)

## **Look\&Feel Settings:**

**Title** (not mandatory) - table title.

**Width** (mandatory) - table width.

**Style** (mandatory) - table row size.

**Pagination** (mandatory) - turning pagination on and off. Turned on by default.&#x20;

**Page size** (not mandatory) - rows per page.

**Border** (mandatory) - table borders.

**Name** (mandatory) - name of the table.

**Visible** (mandatory) - makes the table visible if turned on. Enabled by default.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2F6TO8a1Js7TTH3qU3ISoz%2Fimage.png?alt=media\&token=8a033792-abb1-4f48-bf21-d887a443b167)

## **Data:**

In this section you can manage table column&#x73;**.**

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FcNVSkvHU1BSx8CVdu5Uc%2Fimage.png?alt=media\&token=d1f9b9f2-0984-42d4-9c90-ac30ee308e77)

## **Workflow triggers:**

* **onCreate** – fires when the component is created on the page;&#x20;
* **onShow** – fires when the component changes its state to visible (displayed on the page);&#x20;
* **onHide** – fires when the component changes its state to hidden (stops being displayed);&#x20;
* **onDestroy** – fires when the component is destroyed;
* **onDataUpdate** – fires by the Table Update Data block;
* **onRowClick** – fires by clicking on a row;&#x20;
* **onRowDoubleClick** – fires by double-clicking on a row;&#x20;
* **onFilter** – fires when the table is paginated;

## **Component Actions:**

### **Table get properties**

Gets the table properties.

**Input** parameters:

* **Component Id** \[*string*] *-* table component's identifier.

**Output** parameters:

* **Title** \[*string*] - table title;
* **Style** \[*enum*] - table style;
* **Pagination** \[*boolean*] - state of pagitation;
* **Bordered** \[*boolean*] - state of border;
* **Visible** \[*boolean*] - state of visible;
* **Loading** \[*boolean*] - state of loading;
* **Current page** \[*integer*] - current table page;
* **Records per page** \[*integer*] - number of records per table page;
* **Total records** \[*integer*] - total number of records in the table.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FnBCvylKQ6i3hsaln3tft%2Fimage.png?alt=media\&token=13534077-89b5-4fe8-8cf0-20a97e4f2ffa)

### Table Set Properties

Sets the table properties.

**Input** parameters:

* **Component Id** \[*string*] *-* table component's identifier;
* **Title** \[*string*] - table title;
* **Style** \[*enum*] - table style;
* **Pagination** \[*boolean*] - state of pagitation;
* **Bordered** \[*boolean*] - state of border;
* **Visible** \[*boolean*] - state of visible;
* **Loading** \[*boolean*] - state of loading;
* **Current page** \[*integer*] - current table page;
* **Records per page** \[*integer*] - number of records per table page;
* **Total records** \[*integer*] - total number of records in the table.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FSF9hX6ZKjqiJUTM4gptL%2Fimage.png?alt=media\&token=e1411708-6bfe-449a-b28b-37b2c08cee80)

### Table Update Properties

Update the table properties.

**Input** parameters:

* **Component Id** \[*string*] *-* table component's identifier;
* **Title** \[*string*] - table title;
* **Style** \[*enum*] - table style;
* **Pagination** \[*boolean*] - state of pagitation;
* **Bordered** \[*boolean*] - state of border;
* **Visible** \[*boolean*] - state of visible;
* **Loading** \[*boolean*] - state of loading;
* **Current page** \[*integer*] - current table page;
* **Records per page** \[*integer*] - number of records per table page;
* **Total records** \[*integer*] - total number of records in the table.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2F4koOyXLAbDvFQ3uEifRJ%2Fimage.png?alt=media\&token=872efdb2-4a54-46d1-85f6-d8efcafe37df)

### Table Get Data

Gets table data

**Input** parameters:

* **Component Id** \[*string*] *-* table component's identifier.

**Output** parameters:

* **Data** \[*model*] - data from table. To be showed in the business process when **Component ID** is specified only;
* **\_limit** \[*integer*] - the maximum possible number of entries in the table;
* **\_offset** \[*integer*] - offset of the current record relative to the first record.

### Table Update Data

Update table data

**Input** parameters:

* **Component Id** \[*string*] *-* table component's identifier.
* **Data** \[*model*] - data from table. To be showed in the business process when **Component ID** is specified only;
* **\_limit** \[*integer*] - the maximum possible number of entries in the table;
* **\_offset** \[*integer*] - offset of the current record relative to the first record.

### Table Clear Data

Clear table data

**Input** parameters:

* **Component Id** \[*string*] *-* table component's identifier.

## Usage example:

[Getting data for a table](https://appmaster.io/help/how-to/getting-data-for-a-table)

[Advanced table design](https://appmaster.io/help/how-to/advanced-table-design)
