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) Hide the table in the list of tables by checking that box.
c) Make the table available in the Global search.
d) Show the tab for file attachments in the form of the table.
e) Trigger on create will be executed only once when you create a new data entry.
f) Trigger after update will be executed each time when you change the data entry.
g) Set conditions for the visibility of the table.
h) Set conditions for the writability of the table.
i) 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.
j) Allows you to create new fields. Just drag a field from the right side to the left side – as shown with arrow (m). 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.
k) Layout elements are no actual fields nor table columns. They help organise the forms.
l) Use table references to create relations between tables. For example, a table ‘Invoice’ can refer to another table ‘Customer’.
n) Rename the data fields you just dragged to describe your data entry.
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) Here you can choose where the label of the field should be displayed.
c) 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.
d) 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.
e + f) 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.
g) Under ‘more options’ the expert user can find additional options:
h) Tooltips will be displayed when you hold the mouse over the field.
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) Set conditions for the writability of the field.
l) Make the field available for the 'Global search'.
m) Deletes the field permanently after requesting confirmation. All data from this column is lost.
n) Closes the dialog of the field properties.