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] How to Merge Objects from a Reference

0
Topic starter

I am trying to utilize Extension Kit to merge documents grouped by a reference object Project.

 

image

So far I am able to use Create Object to create my placeholder document when my project enters a workflow state. Then I want to have a new merged document to be created when the placeholder enters the "Render Package" state. I have a configuration attached and screenshotted below. However, the only result I get is a newly created object created from the placeholder but not the reference package documents.

 

image
image
image

Ultimately my use case is that I want a project to hit a stage in its workflow where it takes all the documents tagged for merge to merge into a new single PDF.

 

2 Answers
2

@kygillette 

 

You can achieve this with the latest Extension Kit version, below is the rule configuration for your use case.

Document procssing rule configuration

As you can see, under the 'Reference expression' it should be property Project Package Documents instead of Project. Because you want to merge files from objects that are referenced under that property.

 

Regards,

kygillette Topic starter 09/02/2024 5:23 pm

@tadej-setinc So I did some more testing and realized this is still not functioning how I thought. So far the only way I can make this work is if my source is an actual Document Object rather than a non document object like Project. Configuration is the same but I modified the workflow and workflow state rule to be for the workflow/state that would exist on the project. The project does have the Project Package Documents property which references the documents to be merged. 

I can make this work if I create a "placeholder" document and then kick off the document processing from that placeholder document object. However, this is a bit awkward per the clients requirements but if a starting document is required we might be able to make that work.

 

image
0

@kygillette 

Currently this is not possible for non document object types. The source object must have a document associated with it, which will be used to perform the action.
I hope this will work for your client.

But we will certainly discuss internally if we could implement this functionality for non document object types.

 

Regards,

kygillette Topic starter 13/02/2024 2:51 pm

@tadej-setinc 

Thanks for the update. It makes sense that it wouldn't work in this way. So instead I have the workflow on the Project object creating a "Placeholder" document from a template and then auto transitioning that documents workflow to trigger the document processing. That is working perfectly and I think will be what the customer is looking for. Thanks for all your help on this!

Answer

WATCH THE WEBINAR

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