Community

Connect with us and enhance your M-Files experience using Unitfly Toolkit for M-Files. Here’s how to get started.

Notifications
Clear all

[Solved] Synchronization of Linked Properties Between Object Types (Extension Kit: Property Operations)

0
Topic starter

Hello everyone

I am currently facing a challenge with the Extension Kit and would appreciate your assistance:

Current Situation:

  • I have an Object Type (OT) "Employee" with a Property Definition (PD) "Project Leader for", which is a multi-select property containing various customers.
  • Additionally, I have an OT "Customer" with a PD "Project Leader", which is a single-select property showing the assigned employee.
  • This means that a customer always has one project leader, but an employee can be the project leader for multiple customers.

Goal:

  • I would like to have these two properties automatically synchronized. When a customer is added or removed from the employee, this change should also be reflected in the customer's property (and vice versa).

Challenge:

  • The "Keep in Sync" function is missing in the Extension Kit. The available options for Property Operations with Select / Multi-Select Properties are only "Append", "Overwrite", and "Empty", which are not sufficient for this case.
  • Currently, I have made the properties on the employee side Read-Only and used an EK: Property Operation Rule – From Source to Target (via Property) to append the company (itself) to the property.
  • Problem: When the project leader changes, the entry is set correctly for the new project leader (employee), but it is not removed for the previous project leader.

Possible Workaround:

  • One workaround that comes to mind is adding a checkbox on the employee object, such as "Update Project Leader". Once checked, a search would be executed to completely recalculate the field on the employee object.
  • Issue: When the project leader changes on the customer side, I still face the challenge of removing the previous value linked to the employee and triggering an update. In theory, what I really need here is a "before change" trigger type to handle this update before the change on the customer is finalized.

Note: Simply updating everything daily does not seem efficient or performant.

Has anyone encountered a similar scenario or have any ideas on how to resolve this efficiently?

Thanks in advance for your help!

Best regards

1 Answer
1

Hi @daniel-mislovic,

on an example where OT Employee = Object A and OT Customer = Object B and our properties are "Choose from A" and "Choose from B" you can do this use case like this:

  • Create Orchestrated rule where Object B will be your trigger source and 2 rules would be there
    • 1st rule: Property Operations that is searching Object A using indirect reference and removing self (%.%)
    • image
    • 2nd rule: Property Operations that is directly searching Object A and appending self (%.%)
    • image

 

This is considering that Object B is your source of truth and only there you can change references between objects. Object A then needs to have the property "Choose from B" Read-Only.

Answer

WATCH THE WEBINAR

Introducing AI Document Kit: Add-on for AI-driven Document Management