ShowPage
Adding fields to tables

The fields determine the columns in your table and therefore what data is held by every row. Every field has a name and a type. Every field may also be required, which is to say that it must have a value. If a field is not required, the value may be missing in a particular row. A field may also be unique, which means that the value of that field must not be repeated into different roles. For instance, if a table has a field Namewhich is marked as unique, if one row has the value "Fred", you cannot add another row that also has the value "Fred" for the field Name.

Fields may have additional properties depending on their type. Every type can specify a set of additional properties that fully specify a field of this type. For instance, if a field has a type integer, the integer type specifies that the user can but does not have to specify minimum and maximum values for this field. For example, if you are representing people in a table you may want to specify that the Age field is an integer that cannot be less than zero.

Instead of a data type holding a new value, you may also choose a field that is a key to a different table, a key to a user, or a file. A key here means that your field will hold a reference to a row in a different table. For instance, in a database describing a company, you may have a table for employees and a table for departments. The Employee table could then include a field that is a key to the Department table, denoting in which department the employee works. Furthermore, the Department table may hold a field with a key to the employee table denoting the administrative head of the given department.

Adding fields

To add a new field to a table, go to the table settings page and click the "Add field" button in the Fields panel. You will first be asked the basic properties of the new field to be added: the label (which is the name of the field shown to the user), the type and whether the field is required and/or unique (see above). The label can include uppercase and lowercase letters, spaces and punctuation if you like. The type is selected from the drop down box and the individual options will be explained in the next section. After you have chosen the basic parameters, click next. Depending on the field type, you will be taken through a series of dialogues to specify that field further. For instance, some types have attributes that can be filled in. For example, for integers you can choose maximum and minimum limits.

For fields that are a key to a different table, you may be asked to pick the summary field. This is the field in the table that is being referenced that will be used as a proxy for the user to pick values for the reference. Internally, references are stored by a row number, but for instance if the user is picking a row in the Employee table to be assigned as an Account Manager for a row in the Customer table, you would want the user to pick the account manager not by an row identifier number, but by the employee's name instead. So you might choose name in the employee table to be the summary field.

Fields that are Key to users or File in a way also act like key fields in that they are stored internally as an identifier. However the summary fields (email and file name, respectively) are not changeable. File fields do have one other option to choose which is the access role required to read files that are uploaded by users into this field.

Finally, you may also be asked to enter a default value. This is asked if you are adding a required field to a table that already has data. Because a value must be present for the existing fields, you supply one as the default value when creating the field. This value will be assigned as the new field value in all the existing rows.