meta data for this page

Working with Associated Objects

The term “Associated Object” is used for M-Files objects, which display a Workflow Map in the preview tab when selected in the list view. 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 benefit from this feature.

The most trivial way to implement the Associated Object – function is to simply drag and drop a Smart Node onto the canvas. By default, any Smart Node used in a Workflow Map already refers to the Associated Object.

Apart from Smart Nodes, associated objects can also refer to free elements. By doing so, you have to create a command 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 workflow, 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 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.
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
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.
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