--- title: "How To Execute CRUD operations on a Table using App Behavior blocks?" slug: "how-to-execute-crud-operations-on-a-table-using-app-behavior-blocks" updated: 2024-02-07T05:51:15Z published: 2024-02-07T05:51:15Z canonical: "help.pillir.io/how-to-execute-crud-operations-on-a-table-using-app-behavior-blocks" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.pillir.io/llms.txt > Use this file to discover all available pages before exploring further. # How to Manipulate Table Data? Based on the business requirement, tables are primarily represented by the **DataGrid**, **ListView** and **Table** components on the App UI. The underlying table data mapped to these App Designer components can be manipulated through App behaviors. The behaviors dynamically connect the backend data and frontend operations that aids the business user in effectively creating a full-fledged working App. The table data can be manipulated using the the **Set** and **in list** blocks for the following operations: ## Initialize a Table The **Set** block is used to initialize the table EmployeeList. ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/image-1706513519740.png) ## Read(Get) from a Table The "**in list**" block with "**get**" option is used to retrieve specific records from a table. A set block is used to store the records that is fetched from the table. Eg: In the image below, 10 records are fetched from the **EmployeeLis**t table and stored in the **EmployeeTemp** table variable. ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/image-1706521339365.png) ### Additional Options The same "**in list**" block can also be used to read and delete a set of records from the table by using the "**get and remove**" option. Here a **Set** block is used to store the deleted records to a table variable. Eg: In the image below, 10 records are deleted from the **EmployeeLis**t table and stored in the **EmployeeTemp** table variable. ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/image-1706521672779.png) ## Update a Table If a primary key is set for the table, the **Set** block updates the record based on the primary key. If there is no primary key, it will add as a new record. ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/image-1706519226495.png) ## Delete Records from a Table The "**in list**" block with "**remove**" option is used to delete records from a table. The block provides options to mention the location of deletion. Accordingly, the records are deleted. Eg: in the image below, the last record will be deleted from the EmployeeList table. (--how to mention primary key?) ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/image-1706519969494.png) ## Points To Consider - Irrespective of the App Designer components that you use to display a table, if you want to perform the Create,Read, Update, and Delete operations on a table; ensure to use the above blocks explained here. - The "in list" block with "insert at" option is also used to insert records to a table. But it is not a recommended approach. Always use the Set block. Refer [FAQ](https://help.pillir.io/docs/updating-an-array-with-new-records-in-app-behavior) section for more details.