How to dynamically filter Remaining Approvers in M-Files Property Calculator?

Dear Community,

For performance reasons I’m trying to build the Approval Property Handler functionality with the property calculator.

I am now stuck at the following function.

I’m trying to set, search or filter the Remaining Approvers value list, the values in this list needs to be basically: All approvers Minus Approved by.

In below example there are 2 Approvers, when User approves I can set his name in the field Approved by via a PC search. I can’t figure out how to do the next step and that is removing User form the Value list Remaining Approvers.

Is there a way to remove a value from a multiselect list based on the presence of that same value in another list on the same metadatacard.

..The Approvers are employee objects with M-Files user on the metadatacard

Hope some M-files guru can help me on this one.

Cheers ,Marcel 

  • Hi Marcel,

    Your use case is little bit complex to implement with PC, but possible and done for several projects.
    You can use Filter Lookup values -mode and Comparing to main object -condition.


    From main object (Check that alias matches with your property): NOT ';%PROPERTY_{PD.ApprovedBy}.FOREACH%%INTERNALID%;%NEXT%'

    From Related object: '*;%INTERNALID%;*'

    Those shold become more readable format when you paste them to PC configurations. Syntax is quite complex but main idea there is to compare internal ids and only pick lookups that are not matching with items in "Approved by" property.

    Consulting Wiki seems still have my old example where I tried to open what this ForEach - LIKE syntax actually does: Rising Error Cases - Consulting Wiki - Partners - M-Files Community (See "Document owner is not allowed to review own document")

    Unfortunately I think there is still no easier way to implement this kind of logic.