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