On this page you will find Tutorials, How-Tos and Tips for developing with open bi.

Add custom fields to open bi entities using Table Attributes

This blog post is a tutorial on how to enhance the standard entities of open bi with custom fields.

Business Use Case

The function will be explained using the following example requirement:

As bi excellence we are blogging a lot. We would like to show a introduction of the author next to the profile picture on each blog post.

The blogger is technically represented by an open bi user. The User entity already provides a first name, last name and profile picture. It does not provide a field, though, where to store information about the blogger.

Add a field to an entity

To add the new field to the entity we have to open the Table Attributes in the open bi Configurator. Here, all standard entities of open bi are shown:

For our example, we select the USERS and double click on it. You can now see all fields that have been already added to the User:

To create a new field, click on the + icon. Enter a Name for the field. This name will be available on the UI later:

Then click on the pencil icon next to the Type field. In the popup you can select the data type of the field. We want the blogger information to be a simple text field of type String:

You can not only choose simple data types in this step. You can also select (Custom) Entities in order to create references with higher complexity. The field "Approver", for example, could be added with the reference to the User entity.

After accepting the selection and clicking on Save, the field is added to the entity's table:

Enhanced field settings

For fields of data types String, Boolean, Integer, Double and DateTime you can additionally configure special properties:

Default Value
If you want to provide a default value for the field, type it in here.
Default Values
If you want to allow multiple default values, specify them here. They will be stored for validation on the database.
You can specify the length of the field, e.g. if you want to limit the number of characters entered for a String field.
is Exclusive
If set to true, only the Default Values are allowed for entry. In consequence, a dropdown box is rendered. If set to false, the user can also enter other values. In consequence, an auto-complete field is rendered on the open bi standard UIs.
is Multiple
The user will be able to select multiple values at the same time.

This shows a String field with two Default Values and is Exclusive set to "false":

This shows a String field with four Default Values and is Exclusive set to "true":

This shows a String field with is Multiple set to "true":

Populate the new field

The new field is instantly available on the maintenance screen of the entity. For our example we have enhanced the Users entity:

When you select a User and click on the pencil icon to edit it, you will be redirected to the details view:

When you scroll down, you will see the new field ready for entry:

Alternatively, you can also populate the entity and the new field using a flatfile upload.

Delete a custom field

open bi uses a modern and highly flexible database interface. So you can edit and delete fields any time:

If you delete the field, its contents will be irretrievably deleted for all records of the entity!
Thilo Knötzele
Author: Thilo Knötzele
Creation date: 19.07.2021
Category: Modelling
back to overview