Creating an Entity variable

An entity is a type of variable which allows a Business User to input a collection of related data into the questionnaire which can either be used at a later point within the questionnaire. Where an entity has been added to the template, during the questionnaire session the following will be displayed:
Questionnaire with entities.
When the Set option is selected, an entity selector will be displayed which will allow the user to choose to create a new entity or to choose from a list of existing entities:
Selecting Entities.
A variable that is defined as type entity (see Editing variables for details about defining entity variables) will be a parent variable which can be augmented with child variables of any variable type that will capture the data that will belong to the entity. There are a number of conditions that must be met in order for entities to work seamlessly:
Type
Description
Entity template
Every entity variable must reference a template that will provide the required structure and variables needed to collect data for the entity. The entity template can be the auto provisioned Contact or Address templates in
Contract Express
or another template as long as that it meets the conditions below. The entity template used will determine the type of the entity (e.g. Contact entity or Address entity).
Even if you are adding entities to any of the auto provisioned templates, each new entity must reference an entity template which may require the entity referencing the template that is being edited.
Name
Every entity must have a child variable that defines the name of the entity. This variable can be of any type and the value will be displayed in the Name column for an entity in Contract Express.
Description
This variable will populate the Description column for an entity in
Contract Express
.
Type
If required, entities can have subtypes (e.g. for contact entities - subtypes will be Person, Company, Charity) which the user can select within the questionnaire in the entity selector.
This variable must be of type Text-Selection
.
Entity selector sub types.
For example, if we have a Lease Agreement template and we wanted to capture the tenant as an entity of type contact we will:
  1. Create an entity variable called Tenant and reference the Contact template.
  2. We need the Tenant entity to collect the name, address and tenant type details, so we will create 8 child variables of the Tenant entity which will capture the Name, Type, Address (as an entity), Address Line 1, Address Line 2, City, Country, Postcode:
    • Tenant:Name
      (compulsory)
    • Tenant:Type
    • Tenant:Address – references the Address template in
      Contract Express
      (Adding the address as an entity will allow the user to reuse the address for another contact (e.g. Landlord).)
    • Tenant:Address:Line1
    • Tenant:Address:Line2
    • Tenant:Address:City
    • Tenant:Address:Country
    • Tenant:Address:Postcode

Defining an entity variable

To create a new entity variable select the plus icon from the toolbar. Select New Variable from the drop-down menu. This will then display the attributes for the variable. Change the Type attribute to Entity and fill out all other attributes on the General tab as required.
Adding new variable from Dictionary Editor.
Click on the Constraints tab.
Constraints Tab.
Click on the ellipses on the Template attribute, this will display all templates that are available within the default server. Note that if this is the first time connecting to Contract Express within the current Microsoft Word session you will be required to enter valid credentials.
Select a template to use as the entity template. Note that even if you are adding entities to any of the auto provisioned templates, each new entity must reference an entity template which may require the entity referencing the template that is being edited.
You will then be able to pull in the variables that have been defined as part of the entity template by selecting the checkboxes. If you wish to select multiple variables under one variable, right click the variable and click “Select Node”. The variables that are selected will be imported into your template against the entity variable with the entity name as a prefix of the names of the imported variables.
Entity template.