There is only one table (“Person”).
Open the database seen in first screenshot.
- Lets add another table – click on “New Table”.
- Add a new Table called “Books”, add fileds “Author” and “Title”.
Click “Save Changes” and see in the “Data model”-Tab:
- Next we need a table “Readings”.
- Create a select-type field “Rating” und a mulit-line Field “Notes”:
Relations and References
- Click on “Create table reference” on the right.
- Drag a reference to “Books” and “Persons” on to the “Fields”.
- Select the form view of the table “Readings” an redesign it.
- Like this:
The reference fields at the top.
- Cklick (in Admin Mode) on of the reference fields to change the display.
- Select “Show as”
- and type in this formula:“First Name” + ” ” + Last Name”
Go to the table “Books”.
Here you’ll the reference to the “Reading” table.
Change the fields displayed in this reference-table.
So is looks something like this:
Formulars and References
Last thing we want to do is insert a formular field. It should refence the age of the person(s) having read the book and display the avarage age.
- Click on “+ Field” ta add a formular field.
- The visual formua editor lets you create the formula with drag&drop.
The new Field “avg Readers age” is diplayed.
Open Ninox-Database Tutorial Part 3 to see details.