Object Relationships

Video: Creating Relationships Between Objects in M-Files

You can define relationships between objects to link interrelated documents. For instance, an offer could contain an offer document and a related price list along with a company brochure. Each object can be updated separately and they have separate version histories. Relationships do not create copies of linked objects, they simply establish references between objects.

By using relationships, you can define metadata connections between objects, just as via the metadata card. For example, you can link a customer with an object. The customer then also appears in the metadata of the object. Likewise, the relationships entered via the metadata card will appear in the Relationships dialog.
Tip: You can utilize the properties of a related object in creating indirect views and searches or in defining filter settings (for more information, see Indirect searches).

Complete the following steps to modify the relationships of an object:

  • In M-Files Desktop, right-click an object and select Relationships from the context menu.
    Result:The Relationships dialog is opened.


    The Relationships dialog contains three tabs representing the relationships from and relationships to the object, as well as one for all relationships.
  • To add a relationship for the selected object, complete the following steps:
    1. On either the Relationships From This Object or All Relationships tab, click the Add Relationship... button.
    2. In the Select Target Object dialog, select the target object by using either the search or the views, or right-click an object and select History from the context menu to select a specific version of the target object.
      Tip: Instead of using the Select Target Object dialog, you can also drag and drop objects from other windows onto the Relationships dialog to form several relationships at once.
    3. Click Open.
    4. In the Define Relationship dialog, select between the Latest version and Specific version option.
      This option defines the version of the target object to which the relationship applies. If you select Latest version, the relationship always points to the latest version of the target object. If you select Specific version, the relationships points to a particular version of the target object and therefore, if the object is updated, the modifications are not shown via the relationship. You can select an older version of the target object via the History dialog.
    5. Click OK to form the relationship.
  • To edit a relationship of the selected object, complete the following steps:
    1. If the object is not checked out, click Check Out in the Relationships dialog to be able to edit its relationships.
    2. On either the Relationships From This Object or All Relationships tab, select the relationship that you want to edit and then click the Edit Relationship... button.
    3. In the Relationship Properties dialog, select between the Latest version and Specific version option.
      This option defines the version of the target object to which the relationship applies. If you select Latest version, the relationship always points to the latest version of the target object. If you select Specific version, the relationships points to a particular version of the target object and therefore, if the object is updated, the modifications are not shown via the relationship. You can select an older version of the target object via the History dialog.
    4. Click OK to finish editing the relationship.
  • To remove a relationship of the selected object, complete the following steps:
    1. If the object is not checked out, click Check Out in the Relationships dialog to be able to remove a relationship.
    2. On either the Relationships From This Object or All Relationships tab, select the relationship that you want to remove and then click Remove Relationship.
    3. In the Confirm Delete dialog, click Yes to confirm that you want to remove the selected relationship.
  • Click Close to close the Relationships dialog.