In TimeTonic the data is organized into tables that can be linked together.
Important : When you link a table to another table, you can not do it in the opposite direction.
Take the time to think about the structure of your database.
Start by collecting the main data you will need.
This article will be based on this example:
I have clients to whom I assign contracts.
The same customer can have multiple contracts.
My contracts include customer information, plus other specific data.
Create 2 tables:
- Clients (main table).
- Contracts (secondary table).
In the Customers table, you want to see a link to the Contract table. This link will be displayed as a tag.
Create a link to another table
1. In the Clients table, create a type column link to another table :
2. Link this column to the Contracts table of the book :
Note : it is possible to link a table to another book, you only have to select the concerned book.
3. Validate :
Contract Number column is now created in your Customers table. This column is linked to the Contracts table.
Fulfill a cell in a column of type link to another table
Create the client Laurent Dias in your Customers table, you want to assign him a contract:
1. Double-clic in the cell Contract number :
2. Enter a new contract number in the text insertion area:
3. Confirm by pressing the enter key. The registered contract is displayed as a tag :
You can even add as many new contracts as you want:
What you get in your main table
Data related to another table appears as tags :
What happened in the secondary table?
Let's take a look at our Contracts table:
1. First column of the table
Note : il est important de connaître les spécificités de la première colonne d'une table.
Three new entries are automatically created. They correspond to the contract numbers that we have entered in the main table; the Customers table.
|Main table : Customers||Secondary table : Contracts|
|Column of type link to another table||First column|
2. Create a new column named after the Linked Table
In our secondary table (Contracts table), a new column was automatically created. This column is named after the main table (here Clients):
In our Customers column in our Contracts table we find labels that look like the column of the type Link to another table that we called Contract number of our main table; the Customers table:
|Secondary table : Contracts||
Main table : Clients
|Automatically created column of type link to another table that is named after the main table||Column-type link to another table that we originally created|
And for good reason, if we look at the parameters of this column, we note that it is also a column of type Link to another table, and not just any other table, our table Customers :
Analysis of the contents of a tag
If you enter this text in a column of type link to another table:
This same text will be included in the linked table in question, and this exclusively in its first column :
Note : Because these tables are linked, if you edit the text in either table in the corresponding column, the text will automatically change to the other table.