---
title: Use Cases
description: "### Document Approval Workflow with assignment completion information in document #### M-Files Elements It is often the case, that customer needs to keep information about document approval (who approved and when) in the document itself. Even though the M-Files history…"
url: "https://extensionkit.unitfly.com/documentation/extended-assignments-use-cases/"
updated: "2025-05-01"
category: Configurations / Extended Assignments
---

# Use Cases

### Document Approval Workflow with assignment completion information in document

#### M-Files Elements

It is often the case, that customer needs to keep information about document approval (who approved and when) in the document itself. Even though the M-Files history has needed information, it is not possible to include that information in the document.

Assignment module creates separate objects (in this example called *Approvements)* that contain information about who and when completed which Assignment.

To support this case, certain M-Files elements are created:

#### Required elements

| **Element** | **Name** | **Description** |
| --- | --- | --- |
| Object Type | Approvement | An object of this object type will be created after a user marks assignment as completed |
| Class | Approvement | Object of this class will be created after user marks assignments as completed |
| Property Definition | Approvement Name | Name of Approvement object. Configured as a simple concatenating of properties: %Approver User% – %Approvement Date% – %Approvement Time% This property is very important as this property will be visible in the document. |
| Property Definition | Approver User | User that marks assignment as completed. |
| Property Definition | Approvement Date | Date when the assignment is marked as completed. |
| Property Definition | Approvement Date UTC | Date UTC when an assignment is marked as completed. |
| Property Definition | Approvement Time | Time when the assignment is marked as completed. |
| Property Definition | Approvement Time UTC | Time UTC when an assignment is marked as completed. |
| Property Definition | Approvement Timestamp | Timestamp when an assignment is marked as completed. |
| Property Definition | Document Approvers Approvements | List of all approvement objects for an assignment for Document Approvers |
| Property Definition | Document Authors Approvements | List of all approvement objects for an assignment for Document Authors |
| Property Definition | Document Reviewers Approvements | List of all approvement objects for an assignment for Document Reviewers |

**Approvement class with all properties:**

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-69.png)

In most cases, document approval workflow has three important steps: authors approve, reviewers approve and final approval.

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-70.png)

To support three different approval states we need to have **three different assignment classes**:

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-71.png)
Each step of the workflow will create separate assignments with different assignment class.

#### Assignment Configuration

With all the elements created, it is possible to configure the **Assignments** module.

The first part of the configuration is used for connecting elements that module looks for and created elements:

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-72.png)

After that, for each assignment class, we will add Assignment Rule that will create Assignment Completion objects and add them to the referenced object (in our case *Document)* [Source Object Property] in property (in our case *Document Authors Approvements, Document Reviewers Approvements, Document Approvers Approvements)* [Completions property].

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-73.png)

#### The Result

To create a new document, the user needs to select Author(s), Reviewer(s) and Approver(s).

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-74.png)

In the state *Document Authors Approve* separate assignment is created and assigned to Document Author – Cristiano Ronaldo. After Cristiano marks assignment as completed, Extended Assignments module creates a separate object (of class Approvement) and add this object to property metadata on Document (*Document Authors Approvements*)

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-75.png)

The same behavior is for the next stages of Document Approval workflow and the result for this example is next:

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-76.png)

As it is visible, the document is now in state *Document Approved* with information about who, when and in which state, approved this document. Now it is possible to add information in the document.

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-77.png)

As this output with semicolons might not be good enough, we have created Macro Properties module which, among others, can convert multi-select lookups to the list of lookups displayed one value per line:

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-78.png)
