> For the complete documentation index, see [llms.txt](https://docs.rulecube.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rulecube.com/v2.5/how-to-guides/forms/create-a-data-table.md).

# Create a Data table

## Introduction

This guide will teach you how to easily create a user interface where the user can manage a list of entities in a table.

> If you're not yet familiar with Persisted Entities, please read [Persisted Entities](/v2.5/how-to-guides/ruleset-development/entities/persisted-entities.md) first.

Persisted Entities can be used to populate a Form Table. This will enable the user to easily create, update and delete instances of these entities.

## Setting up the Ruleset

### Enabling persistency

1. Create a new Ruleset and go to the Ruleset's Version Settings in the left menu
2. Check the 'Library' box
3. Check the 'Allow persistency' box

### Creating the Person Entity

1. Create a new Entity named 'Person'
2. Add a 'FirstName' property of type `string`
3. Add a 'LastName' property of type `string`
4. Add a 'Birthdate' property of type `date`
5. Finally, check the 'Allow persistency' box and save the Ruleset

### Creating the Form

1. Add a new Form to the Ruleset
2. Go to the 'Data sources' tab
3. Create a new Data source
   1. Set the name to 'Persons'
   2. Set the type to 'Persisted Entity'
   3. Set entity to 'Person'
4. Go to the 'Definition' tab
5. Open the first page
6. Add a section and open it
7. Add a 'Table' element to the section
   1. Set 'Property binding source' to 'Data source'
   2. Select the 'Persons' data source next to it
   3. Click on the 'Create a new one' button next to Columns
   4. In the popup select 'Person' and click on 'Add all base properties'
   5. Move the 'Birthdate' property below the name properties
   6. Click OK
8. Save the Ruleset
9. Click Preview at the top

You should now be presented with the Form and an empty table with a '+' button. You can use this to add a new Person instances to the table. When a Person instance is added, it is also persisted in the database. You can check this by refreshing the page and seeing the previously saved persons.

You can also edit and delete an instance of a Person entity.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rulecube.com/v2.5/how-to-guides/forms/create-a-data-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
