Link to entry
Link to entry is one of the types of Field values.
A link to entry field allows you to create a relationship between one entry and another. The value of the field becomes a reference to another entry in your application. (If you want to create a link to several entries at once, use a List of entries field.)
How links work and when to use them
If you’re new to working with databases, the purpose of a link can seem confusing at first. The idea behind a link field is to streamline the structure of your data and reduce any chance of duplication.
Example of a link field
In an invoicing application, you might want to create multiple invoices for specific clients. On each invoice entry, you could type the name of the company by hand into an “Client” field. If you want to add more information about the company itself though, such as the company address, it would be irritating to add this data to every single invoice (“Client’s address”), especially if you have many invoices for one client. Also, if typed by hand, there’s a good chance for data to become inconsistent.
Instead, the best approach is to create entries for each company in a separate “Client” category, and then have the “Client” field on each invoice entry link to the appropriate Client entry.
If you created a view of your invoices, you could also add Columns showing data from the linked company entry. See derived fields for more information.
Click on the image at right to see a diagram showing Invoice entries linked to Client entries.
How links are set up
A link to entry value is restricted by category. When you change a field to this type, you must choose either to use an existing category in your application, or to create a new one. Values in this field can only be links for entries in the chosen category.
(Note that if you later change the category a field links to, any existing links will become invalid if the linked entries are not in the new category.)
Using data from linked entries on a view
When you add a link to entry field to a Table view as a column, you can then also add fields from the linked entry to the view. To learn more about this, read the section on Derived fields.
Converting a field to have a link to entry value
You can change a field to have a link to entry value using the Field configuration.
Choose a category
You must choose an existing category or type the name of a new category of entry that this field will link to.
The conversion process
When you convert field types, existing data in the field will be converted intelligently. When you convert from a static text or numeric field, Dabble will turn the text into a link. How this happens is as follows:
- If an entry already exists in the category with the same name as the text in the field, a link will be created to that entry.
- If an entry does not exist in the category with the same name as the text in the field, a new entry will be created with that text as its name, and a link will be created to it.
Advanced options
Only show unpicked items
This option affects what entries can be chosen while linking. If the option is enabled, then entries will disappear from the list of possibilities after they have been chosen once. That is, they can only be linked to from one entry. Conversely, if the option is disabled, then an entry can be linked to multiple times, from different entries.
Another way of thinking about this is that it allows you to enforce a sense of “ownership”. If enabled, then an entry that links another entry in this field will “own” that entry — it will not be permitted to be linked from anywhere else. This is like a “mother and child” relationship — a child normally only has one mother (biologically speaking anyhow).
An example of when this might be useful is in setting up an invoicing application. You might have a project entry that links to an invoice you’ve submitted for that project and you want that invoice to be exclusively linked to this project.
Show other side of link
If this option is enabled, an “inverse field” will automatically appear on entries that you link to. In this case, there will be a link or List of entries field on the category you link to. Read more about inverse fields. If you change the link or delete the field, it will be changed or deleted in both places.
Choose how entries should be displayed for this field
If the linked category already exists, you can choose how those entries should be identified in this field. Use the drop-downs to choose fields from the linked category. You can add punctuation or spaces between each field using the text inputs. See entry names for more information.
