Community
Connect with us and enhance your M-Files experience using Extension Kit for M-Files. Here is how to get started.

Have a primary document with a lookup property that links to another document. Both have Excel files in them.
When the primary document reaches a certain workflow state I want to copy a specific sheet from the related document into the primary document. So the primary document will have to be the trigger source, and Map Mode will have to be SourcheObject. The is no option to specify direct link to the related document, so I have to use Vault Search to get this document.
I have created a reverse link on the related document to be able to use that property in my search criteria. The reverse link is a multiselect property because this document can be used in several primary documents. I have tried to use "Contains" or "=" {.} (self) in the Dynamic value, and as always MF-Admin says "The placeholder "{.}" is invalid." Normally we just ignore that message, but perhaps it correct in this situation?
Anyways, I can see in the logs that the rule gets triggered and is completed with no errors logged, but there is no change in the primary document. I guess the rule is not configured correctly to get the relevant named sheet from the related document, but I cannot figure out how to get it right. Any suggestions?
I am using versions ExtKit 25.5.2 and M-Files 25.6.14925.4.
Hi Karl,
You're right - at the moment, your use case can't be fully addressed using just the Excel Writer module. We're evaluating ways to support this in the future. In the meantime, here are a couple of workarounds that you could try:
-
Using Property Operation and Specify Target Object
You could use the Property Operation module, triggered by a state change on your primary document (Proposal), to set a flag on the secondary document (Price List). Setting the flag to “true” could then trigger the Excel Writer rule. From there, you can use the Specify Target Object feature to locate your primary document and copy the sheet from the source file to the target. This approach is more elegant if you don’t create multiple Proposals at the same time that refer to the same Price List. If that’s a common scenario, this method may not be suitable. -
Using Document Processing and Add or Replace File
A more universally reliable, though slightly less elegant approach is to set up a Document Processing rule (also triggered by a state change on your primary document) that uses the Add or Replace File action to copy your secondary document to the source object. Once both files are available on the source, you can copy the sheet from one to the other. If having multiple files is an issue, you can delete the unnecessary one after copying and convert the remaining file into a single-file object.
Unfortunately, there's no perfect solution for your specific case at this point, but I hope one of these options will work for you. If you’d like any help with the configuration, feel free to reach out.
Best regards,
Nika
@nikatilic Thank you Nika. Not perfect but certainly a workaround that can help us for now.
Just to explain the use case: The primary document is calculation of a proposal. It is created from a template and needs to refer to the current price list. The related document is the price list. Prices will get updated from time to time, but the primary document must remain the same based on the current price list at the time of creation. Therefor the intention is to copy the relevant sheet(s) from the price list into the calculation document. This sheet will then remain there and its content can be used without risk of changes.
I can imagine other use cases where it will be relevant to copy sheets or cell content from a related document. It would be great to be able to just point out that relation in metadata and then use the related document as source. It probably is possible already, I may just not have found the correct configuration yet...