Working with Associated Objects

The term Associated Object is used in conjunction with M-Files objects, that display a certain Process Map, when selected in the list view. More specifically, this can be done using either the Show with Object Class function, a Workflow Map, or a Work Step Map. Based on this, we implemented a powerful feature, that lets you determine dynamic commands that change their actions according to the selected M-Files object.

As you can see, we used just one Smart Node to display the metadata of the different employees, which are in the same workflow. By switching between them, the context displayed within the Smart Node changes dynamically according to the selected one. By doing so, users don’t have to switch between the Workflow Map and the metadata card.

Especially free elements (like squares, ellipsis, polygons, etc.) and Smart Nodes for M-Files Objects benefit from this feature.


Creating an Associated Object

As mentioned above, free elements and Smart Nodes for M-Files Objects are able to use the Associated Object functionality. We will now have a closer look at how we can configure this.

  1. Drag and drop the desired element (free element or Smart Node) from the Library onto the Canvas.
  2. Select it and switch to its Properties tab.
  3. Unfold the General section.
  4. Open the item Reference Object and select Associated Object.


Creating Commands for the Associated Object

If you use a free element for your Associated Object, you can also create special commands for it within the Properties menu.

After opening the commands menu, you must:

  1. Decide which Action should be performed.
  2. Select Associated Object from the drop-down menu.
  3. Click Add.
  4. Check if the Associated Object is set as the Reference Object in the general tab.


To provide you with even more options, you can also use associated objects within M-Files URL’s. By opening the command menu:

  • You must select URL from the target drop-down menu.
  • Next to it, Placeholder must be selected.
  • The placeholder editor is opened by clicking on the square brackets icon. Use it to generate dynamic URLs from your M-Files properties by pressing the Insert Placeholder button. Pay attention to the highlighted end of the text in the image. This indicates that the Name or Title property is filled dynamically depending on the associated object.

Since more than one object is usually assigned to a Job Aid Map, it is often impossible to use static elements to display the desired metadata of each object. Imagine how complicated and confusing it would be to display all elements of an object type on the same canvas to cover every object that could possibly be selected. By using dynamic commands of an associated object, you only need a few shapes to perform any desired action on it. This greatly reduces your modeling efforts. It also makes it easier to develop templates by storing shapes that already have meaningful commands in storage and use them for other Job Aids and Workflow Maps.

Here are some examples for customized commands:

URL Description
mailto:%PROPERTY_{M-Files.AdvancedNotifications.EmailAddress}%?subject=%PROPERTY_{Prop.Title}%&body=Sample text
Here a mailto is triggered, an e-mail is generated and sent to the “marked” employee. The subject contains e.g. the name of the marked object.
m-files://search/2F005834-52BB-42B6-BD1D-7E272F60BA9A/?search=%PROPERTY_0%
This is where a search for metadata (e.g. the title of the associated object) in M-Files is triggered.

%PROPERTY_0%: Name or title of the associated object
m-files://search/Sample%20Vault?objecttype=%OBJTYPE%&propertyvalue=1078/%OBJID%
Here a search is triggered with the ObjectID for Property-ID 1078. 1078 could for example be a property that has a reference to the associate object on the object (e.g. a linked customer). The URl would thus trigger a search for all documents that have a reference to the associate object in property 1078. For example 22 is the ID of a customer and property ID 1078 is the property “Customer” on the metadata card of the document. So if I select a customer, have a Workflow Map for customers and there is a form on it that shows me “all customer documents”, I could put this command there.
m-files://show/FFE93D16-218E-468C-92A6-02B1149493F2/%OBJTYPE%-%OBJID%
Here the associated object (dynamic) is opened directly by clicking on a command:

Vault GUID = FFE93D16-218E-468C-92A6-02B1149493F2
%OBJTYPE% = ID of the ObjectType (e.g. Document)
%OBJID% = Object-ID (This is dynamic for the associated object)“
This website uses cookies: We only use cookies here as standard user session identifier, for authentication after login and for remembering helpful user preferences, like the size of the text editor. More information