How to Manipulate Table Data?
  • 07 Feb 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

How to Manipulate Table Data?

  • Dark
    Light
  • PDF

Article Summary

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.

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 EmployeeList table and stored in the EmployeeTemp table variable.

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 EmployeeList table and stored in the EmployeeTemp table variable.

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.

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?)

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 section for more details.

Was this article helpful?

ESC

Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses