Create a Relationship Marker
In the following step-by-step example, you will be creating a relationship marker that defines the connection between a character in a book record (say in a set of classic books) and one-or-more other character records. There are a number of elements that need to be set up in order to create the relationship:
- The Character record type (we’ll assume this is connected to a Book record type).
- The Character Relation field (using the Relationship Marker data type) to define the type of relationship to another character.
- The Terms List to use (to define the allowable types of relationships). In this instance, you will be using the standard Family terms list (see also second example below on creating a terms list on the fly).
Create the relationship marker field
Given a Character record type, open the record structure editor (this can be done from the modify structure link when you are editing a Character record, or through the menu on the Manage tab (Structure > Build):
Click the [+] icon and then the Define new field button to add a Relationship marker field:
Complete the Define new field type dialog; call the field: ‘Relationship to Character’. Set the Data Type to ‘Relationship Marker’.
In the Vocabulary (terms) field, select the vocabulary to use as your terms list (this restricts the type of relationships this record can have). In this example, we will use the standard terms list ‘Family’.
Next, define the set of target record types to which this relationship can point by clicking Select Record Types. In this case, since you wish to point to another character (relationships can be to any record type), select the Character record type (Heurist will already have added this to the list):
Note. If you don’t select a particular record type to point to (e.g. in cases where you don’t know in advance what type of record might be referenced), the pointer field will be ‘Unconstrained’, which means the user can select any record from the pointer field.
Your screen should now look something like this:
Note. At this stage you can use Preview to preview the result. You can also add any term missing from your vocabulary using the Add Terms option.
Set the field behaviour
In the Expression dialog set Repeatability = repeatable (since a character can have multiple relations to other characters):
Save the new record type.
Test the relationship
Create a number of characters to work with first (without entering relation details). In this example, we’ll use these characters from Pride and Prejudice:
For each character, create a new record of type Character. From the Add Data tab, select Keyboard | Add Record and select the type of record = Character. Click Add Record.
Next start adding in the character relationships. First, (for example) edit Elizabeth Bennet:
Create the first relation by clicking in the Character Relation field and selecting ‘…is daughter of’. Click in the Target Record field and select ‘Mrs. Bennet’.
Note. Use the Optional dialog to add any additional relationship details, to be stored in the Relationship record.
The relationship marker field should look like this:
Click Add Relationship to add the relationship as a new record.
You can now create additional relationships. For example:
To view these relationships use the Network Diagram:
You can edit relationships and add additional relationships directly from this view.
In the following step-by-step example, you will be creating a relationship marker that defines the connection between a book record and one-or-more person records. In this instance, you will also be creating the terms list for the relationship marker.
Given a Book record type, open the record structure editor (this can be done from the modify structure link when you are editing a Character record, or through the menu on the Manage tab (Structure > Build):
Click the [+] icon and then the Define new field button to add a relationship marker field:
Call the new field called Author, Publisher, Proofreader, and set the Data type to ‘Relationship marker’:
Define a new vocabulary (Add a vocabulary link) called Publication role:
Add Author, Publisher and Proofreader as terms (Add Vocabulary button).
In the Define new field type screen, click the Target record types button and choose Person as the target record type:
Now you can create the content that will be used within the module.