While with entities you manage the records at runtime, with static entities the records are managed at design time. This means that, right after you have created a static entity you are allowed to add the static data records (visible under static entity's Records folder) and use them in your application design.

Organize your static data in groups of data of the same nature. Then, for each one of those groups create a static entity reflecting the nature of the static data and add the correspondent static data records.

Although the static data records are managed at design time (and saved in the eSpace) when the application is published the OutSystems Platform automatically persists those records in the platform database.

Creating New Records

Create a new static data record by adding a record to the static entity.

How to add a record:

Simply execute one of the following operations:

  • In the eSpace tree, under the Data layer, right-click on the Entity and select Add Record;

  • Right-click on the Records folder of the static entity.

After the record has been added, set the record identifier and in the Properties pane set the other attribute values.

Changing Records

Select the static data record in the Records folder and edit its attribute values in the Properties pane.

Deleting Records

Select the static data record in the Records folder and simply delete it.

How to delete a record:

In the eSpace tree, under the Data layer, right-click on the record (under the Records folder of the Static Entity) and select Delete.

Once you delete a static data record that was already persisted in the Platform Database, the following occurs:

You may also manage the static entity's records in the Records Tab of the Entity Editor.

Using a Record

When designing your application use the record's identifier directly in your business logic, for example:

Whenever you use static data records in SQL queries you are not allowed to insert, update or delete any of those records as that is managed by the OutSystems Platform.

See Also

About Static Entities | Static Entity Records Tab | Entity Editor | About Entities | Manage Entity Records | Static Entity Properties | Entity Properties | Find and Replace Entity Usages