This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Convert to doc multifile, add a file

Former Member
Former Member
One of my users asked for the ability to send a single document out to a bunch of people (who will change) and have them perform various tasks in parallel.  The originator needs to know when each task is finished.  At first, I thought it wasn't feasible.  But after thinking about it for a while, I realized that there might be a way...  If we attach some sort of "traveler" document with the original document, the originator can specify tasks for each user.  If we have a property with all the specified users listed, the workflow can fire separate assignments at each user telling them to look at the traveler and mark their task complete when finished.

I'm thinking to make this work, I need to write a small script that would fire whenever this workflow is applied to a document:

1) Check if the original doc is a multi-file document
2) If not, convert to multifile
3) Check to see if the multi-file original doc contains a file named "Workflow Traveler"
4) If not, find the original "Workflow Traveler" document in M-Files, make a copy of the file, and add the copy to the multi-file doc.

I can do everything but #4.  I can't seem to find a way to make a copy of a file in M-Files and add it to the multifile doc.  The "AddFile" method requires an absolute path.  Can anyone suggest another approach?

Thanks,
Jason
I can handle everything except #4... I can find the original traveler document, but I can't figure out how to attach it
Parents
  • Former Member
    Former Member
    Dear Jason,

    For #4, I think that you can download the "Workflow Traveler" file to somewhere first and then using "AddFile" to add the downloaded file back into the converted multifile object. After that delete the download file.

    Hope this help.
    Cheers,
    Pattama
Reply
  • Former Member
    Former Member
    Dear Jason,

    For #4, I think that you can download the "Workflow Traveler" file to somewhere first and then using "AddFile" to add the downloaded file back into the converted multifile object. After that delete the download file.

    Hope this help.
    Cheers,
    Pattama
Children
No Data