Create and Modify Tables

Please activate the administration mode (wrench icon in the upper right corner) to create or extend tables.

A new table can be created on the database homepage or within the data model. Tap on the table name within the data model to modify existing tables. Both ways will lead you to the table editor:

a) You can choose the table name quite freely and change it anytime.

Just keep in mind that you can’t create two tables with the same name.

b) The description field can help you keep track in more complex data models. It is shown in no other place.

c) Trigger on create will be executed only once when you create a new data entry.

d) Trigger after update will be executed each time when you change the data entry.

e) The global unique identifier is generated automatically by Ninox. It is of internal use only. Although you are allowed to modify it, you should only do so for good reasons.

f) Shows a list of the defined data fields in this table (i.e. table columns). You can change their order by drag & drop, which affects the following issues:

  • The field order determines the default order of the columns. Beyond that, the column order can be configured independently – see chapter Views.
  • More importantly, the field order determines how forms are displayed.

g) Allows you to create new fields. Just drag a field from the right side to the left side – as shown with arrow (j). As soon as you create a field, the field attributes dialog opens.

Check out the chapter data field types for an overview of the available fields.

h) Layout elements are no actual fields nor table columns. They help organise the forms.

i) Use table references to create relations between tables. For example, a table ‘Invoice’ can refer to another table ‘Customer’.

k) Rename the data fields you just dragged to describe your data entry.

Field attributes

When creating a new field or tapping on an existing one, the dialog of field attributes opens. Depending on the data type different settings are available. This example shows a text field:

a) You can choose the field name quite freely, as long as it isn’t empty or duplicated in the same table. You can change it anytime.

b) If you define it as ‘required’, the field must be completed in every data record. However, Ninox isn’t very restrictive: if you leave it empty, only a warning is shown.

c) Default values can help enter your data more quickly. Define a default value that Ninox uses to fill in this field automatically for every new data record. Some data types even support special default values. For example, the date field allows ‘today’ in order to set the current date.

d) Text fields allow the definition of the minimum and maximum length (number of characters). If the text exceeds these limits, Ninox will give a warning.

e) See minimum length.

f) Sets the field width as displayed in forms. Forms are organized in four columns, so one field is at least one column and at most four columns wide. If you don’t define the width, Ninox does so automatically.

g) Only for text fields you can define if it is multiline or not.

h) Under ‘more options’ the expert user can find additional options:

i) ‘Display field only, if:’ allows to hide a field in the form under certain conditions. This condition is defined as a formula. Set the formula to ‘No’, in order to hide the field permanently.

j) ‘Trigger after update’ refers to a script which is executed after any modification of this field.

k) The global unique identifier is generated automatically by Ninox. It is of internal use only, although you are allowed to modify it. That only makes sense for expert users.

l) Closes the dialog.

m) Deletes the field permanently after requesting confirmation. All data from this column is lost.