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 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.

Last updated