Classes

The building blocks of your blueprint are classes. Classes can be accesed through the backstage, by clicking the "Classes" button. At the left side of the screen, the classes in this blueprint are listed. Classes should have names starting with a lowercase alphabetic character.

When creating a class, the following data must be entered:

  • name
    The name of the class should start with a lower case because the name is frequently used in dialogs.
  • plural
    The plural should also start with a lower case, and is also frequently used in dialogs.
  • Group (optional)
    Classes can be organized by adding them to groups. New groups can be added with the button next to the dropdown menu.
  • description (optional)
    A description is a user-friendly description of the class. This is for your reference only.
  • database table name
    The name of the database table to store the data of this class. When you click the button a valid name is generated automatically.

Add fields

All classes have fields, they are the properties of the objects in this class. When you think of a class as a table, then the fields are the columns. The class "person" might have fields like "name" and "gender". You can find the fields that belong to a class under the "fields" tab. To add fields to your class, use the "Add field" button and a new line will appear. Here, the following properties should be set:

  • name
    The name of the field is used to identify the field. All fields in a class should have unique names.
  • database column
    The data of the field has to be stored in the database, so it needs a database column name. The name of the database column may not contain spaces or special characters or numbers. By clicking the button "generate column names" the studio generates the names automatically.
  • data type
    Click the "Select from a list with explanations"-button to select a data type. The data type influences how the data is shown in application screens and how users can modify the data. Furthermore, it defines how user input is validated. For example when the data type is "date", only valid dates will be allowed. If we do not specify a data type, the data type "text" will be used as default.
    More information on data types can be found in the documentation on fields and data types.

More properties can be set at the field details.

Primary key

In almost all cases the objects of your class need to be stored in a database and need to be updated by users. In order to allow updates, the class requires primary keys. Primary Keys are fields that identify separate objects. Most classes have one single primary key field, but in some cases a combination of fields is more suitable.

A numerical autonumber id is a good way to identify separate objects. To add a numerical key field, click on "Add key field". To change an existing field into a key field afterwards go to the details of the field and check the 'key field' property.

Label fields

"Key fields" are used to identify your objects in a technical way. However, this doesn’t always make sense to a user. Usually your class has other fields that identify the objects for users better, like a "name". The fields that best identifies the object for users are called the label fields You can select a single field, but also a combination of fields (like "first name" and "last name"). You can select any combination of fields of your class as the label field, and it is possible to add a prefix or postfix.

You can set the label fields on the tab "Presentation".

Columns in table

Data can be displayed in a table: every record on its own row. In case the class has many fields, you usually do not want to see all fields as a column in a table.

You can set the label fields on the tab "Presentation". More about columns in tables can be found in Defining the columns of a table.

More properties

More on search fields in Searching for data.