Skip to main content

How to create relationships between entities

Link an entity to other entities from its Relationships tab, or through a relationship property on the Metadata tab.

A relationship links one entity to another and carries a label, such as "Author of" or "Mentioned in". Build links by hand on the Relationships tab. Use a relationship property on the Metadata tab when your template has one.

Prerequisites​

  • The editor or admin role, or permission to edit this entity
  • At least one relationship type in your collection
note

With no relationship type in your collection, Uwazi stops you at the Choose relation type step. Admins can add a type there. Everyone else reads "An admin needs to add relationship types before you can create a relationship."

Steps​

Open the entity and select the Relationships tab. The tab carries a count of the relationships it lists.

Create a relationship​

  1. Select Edit in the footer.
  2. Select Create relationship.
  3. On the Select target entity step, type a name in the Search entities... box.
  4. Choose the target entity from the results.
  5. On the Choose relation type step, pick a type.
  6. Select Create relationship.

Uwazi saves the link and flashes a "Relationship created" message.

To point at one passage rather than a whole entity, highlight the text in the document before you open the wizard. The wizard then adds a Select target document step and a Select text in target document step. See how to create references in a document for that path.

Create the target entity as you go​

  1. On the Select target entity step, use Create new entity from selection.
  2. Type a Title.
  3. Pick an Entity type.
  4. Select Create entity.

Uwazi creates the entity, then carries on with it as your target.

Delete a relationship​

warning

Deleting a relationship removes the link for everyone, and you can't undo it. Uwazi deletes it the moment you confirm, even in edit mode.

  1. Point at the row you want to remove.
  2. Select the trash button on that row.
  3. In the Delete relationship dialog, select Delete.

To remove several at once:

  1. Select Edit in the footer.
  2. Select each row you want to remove, or use Select all.
  3. Select Delete.
  4. In the Delete relationships dialog, select Delete.
  5. Select Save to leave edit mode.

Save and Cancel only close edit mode. Neither one undoes a deletion.

Narrow the relationships in the view​

You don't need edit mode for any of this.

  1. To search, type in the search box above the list. It reads Search • AND, OR, NOT, "exact", wild*, and the tips button beside it lists the syntax.
  2. To change the layout, select one of the three view buttons beside the search box: List, Tree, or Graph.
  3. To reorder the list, open Display options and set Group by, Then by, Sort, or Density.
  4. To filter, open the filters drawer and pick values under Relation type or Target entity type.
  5. Select Clear all filters to start again.

Uwazi groups by Relation type and sorts by Appearance to begin with. None of these choices stick: they reset each time you open the entity.

The tab lists the links tied to the document you have open, plus the links that sit on the entity as a whole. Open another document to see its links.

An administrator sets up the property first, as described in how to set up relationship properties on a template.

  1. Select the Metadata tab.
  2. Select Edit in the footer.
  3. Find the relationship property, labelled with the name your administrator gave it.
  4. Select Add entity, type in the Search entities… box, then pick an entity.
  5. To drop one, select the remove icon on its row.
  6. Select Save in the footer.

Unlike the Relationships tab, this form holds a draft. Nothing changes until you save.

Result​

The linked entities appear on the entity's Relationships tab, and property links also appear in their property on the Metadata tab.

See also​