Conditional Metadata Configuration Based on Logged-in User

Hello M-Files Community,

I’m currently tasked with testing if metadata configurations can be controlled based on the logged-in user. Here's the scenario I’ve been asked to explore:

  • When a certain user, for example, my supervisor is logged in, the metadata card should display certain properties like in Screenshot 1 (attached).
  • When I am logged in, the metadata card should show the properties as in Screenshot 2 (attached).

The goal is to have the metadata card dynamically change its configuration depending on the user who is logged in. So far, I’ve only been able to configure properties based on class, or specific property values, but not based on the logged-in user.

I’ve tried:

  • Adding a new rule in the Metadata Card Configuration by using a filter in the properties section.
  • Using the "Owner (User)" property to control visibility based on the logged-in user, but it didn’t work as expected.

One major complication is that some of the properties are tied to M-Files objects, such as the "Approval Team (Obj.)" property, which comes from a specific object/class.

I would appreciate any guidance or solutions on how to achieve user-based metadata configuration, since i couldn't find anything related to this topic in the forum.

Thanks in advance!

Parents Reply Children
  • Hi Joonas,

    I went through the official M-Files documentation that you linked (and that I had reviewed before posting this discussion), but I found it to be quite superficial and it didn’t provide a solution for my specific case.

    Moreover, i had already tried using the "Document Owner" property with a SetValue rule to automatically fill it with the current logged-in user (see attached screenshot from my M-Files Admin).

    However, this approach didn’t work because "Document Owner" refers to a specific user who needs to be assigned manually to that single document. While this is possible, it involves a lot of manual work and doesn't fully address the goal.

    However, the issue is there's no property or filter in the metadata card configuration that dynamically references the currently logged-in user. This limitation makes it difficult to adjust metadata fields based on who is logged in.

    The goal here is to keep the metadata card simple and clean for certain end users — for example, a certain highly positioned employee who doesn't need to see every single metadata field. The idea is to display only the relevant fields for certain users while hiding more technical or detailed metadata. 

    • For a senior executive of a company, the metadata card should only show minimal metadata for certain document classes like "purchase invoice" or "purchase credit memos", to keep things as simple as possible.

    Is there perhaps any other method or a workaround to achieve this without resorting to manual assignments?
    Maybe by using a Vault Application or a VBScript to control how the metadata card looks for a specific logged-in user? 

    Thanks again for your help!

  • It's not currently possible to modify the metadata card behavior based on the logged-in user except for filling a property default value (SetValue rule). 

    My suggestion would be to keep the more technical and detailed properties in property groups which are collapsed by default for all users. Then those users who need to see additional information can expand those groups.