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

Delete Documents befor regenerating from template or versioning

0
Topic starter

Hello everyone,

We create documents from templates using Object Creation. If these documents need to be corrected, we would like to delete and regenerate them through an appropriate workflow step. Another option would be to version these documents. How do we go about this? I'm not entirely sure how I can use the versioning module for this purpose.

Here's a short description of the process:

  1. We create documents from templates using Object Creation.
  2. The documents are merged via Document Processing and then reviewed.
  3. The documents can either be approved or sent back for correction. After review by the creator, they should either be deleted and recreated or recreated and versioned.
  4. In a final step, the merged document will reviewed again and may be sent back for correction. If the merged document needs correction, it should either be deleted and recreated or recreated and versioned.

 

Thanks and regards

Steve

1 Answer
0

Hi Steve,

I would advise you to try using Auto Numbering Properties module for this, because this module calculates version when new object is created.

For example, I've created class called "Simple Document". On that class there is a text property "Version" which will be automatically populated when Simple document is created (both manually or via Object Creation in "Create new document" state). Value that is set to "Version" is calculated by finding largest "Version" value in class "Simple Document" and incrementing it by 1. This can be modified inside rule configuration.

Using this logic, for example, you would have Version property set to 1 on your original document. When you decide that new document should be created, you can trigger Object creation by moving object to state Create new document. At this moment, new document will be created with Version 2 and original document would still have Version 1. This process can be repeated through workflow as much is needed.

I've attached Auto Numbering Properties configuration rule and Object Creation configuration rule. Also, I've made a rudimentary workflow based on your description. It might not be an exact match of your process but hopefully would give you an idea how this rule could work in your case.

 

image

Additionally, Auto Numbering Properties can be modified in a way that it calculates Version based by specific grouping property (Numbering value -> Property value -> Grouping). Also, in order to be populated by calculating described above, Version property must be empty before creation. If it is not empty, Version property will be set by value inserted by user instead of being calculated.

Kind regards,
Mihovil

Answer