With the Logging module, you can manage the minimum log level you want to export, logging destination, and Event Log forwarding.
The minimum log event level for sending events to file and event log which we recommended is Verbose.
Under the Logging destination user can define:
The folder where log files will be generated
The approximate maximum size, in bytes, to which a single log file will be allowed to grow. (When the file size limit is reached, a new file will be created. Filenames will have a number appended in the format <code>_NNN</code>, with the first filename given no number.)
Whether to include logs from event log sources in application logs.
Keep in mind that a vault restart is required if you want to apply changes that you did in the logging module.
In order to analyze a specific M-Files workflow, first we need to find and export event logs that relate to that specific process. To do event logs extraction from M-Files, the PI Kit will be used with its Data Export feature.
First, we need to have a prepared SQL Server database in which the PI Kit will store data. After that, we go back to M-Files Admin → Configurations → Process Intelligence Kit where we start with the configuration.
For this case, we are using the Data Export feature. First thing is to enable configuration to be executed later, after which we choose the export destination by creating a connection string with a database that we earlier created.
Next is to choose an export frequency, however, this can be left empty.
After that, we have to choose whether all object types will be included, or only specific ones. If we choose Selected the next property Object types filter will ask us to select ones to be included in the data export.
Next is Ignored logic accounts which will be left empty since we need all accounts to be included in the export.
After that comes the most important property if we want to add specific data to our event logs → Data enrichment rules. Here we define specific rules for filtering M-Files properties or adding additional properties to our event logs. This could be location, users, etc.
Lastly, the data pull setting allows for specifying when will data export be executed due to specific database constraints.
REST Connector allows users to synchronize external data in M-Files via REST API. For example Users, Products, Cost Centers. This connector is most useful for doing integration between two systems, just to make sure that both systems has the same data and to avoid inconsistency of data.
API Example
We have object type User Object Type in M-Files with the following properties:
Send custom notifications based on business rules inside M-Files. Extended Email notifications allow users to send notifications when property has changed or when an object entered workflow state, send notifications when someone has commented object, and much more.
Configuration
After you have successfully installed the application, you can start adding calculation rules.
Open M-Files Admin
In the left-side tree view, expand the desired connection to M-Files Server.
In the left-side tree view, expand the Document Vaults node.
Still, in the left-side tree view, expand the vault where you installed the connector and select Configurations.
Expand Other Applications
Expand Extension Kit
Click on Extended email notifications.
Field description
Field
Value
Description
Enabled
Yes/No
Specifies whether the module is in use.
Configuration mode
Simple/Advanced
Display basic or advanced options for module.
Mail server
SMTP server
Text
Server from which e-mail will be sent.
SMTP server port
Integer
Port on given server.
Transport Security
One of the following: Auto SSL TLS None
Specifies security protocol that will be used in transport.
Username
Text
Username of e-mail account.
Password
Text
Password for that account.
Local domain
Text
Specifies the local domain.
Sender’s e-mail address
Text
Email address from which e-mail will be sent.
Rule groups > Group [n]
Name
Text
Custom rule name.
Description
Text
Optional rule description.
Enabled
Yes/No
Specifies whether the rule is in use.
Configuration mode
Simple/Advanced
Display simple or advanced configuration for rule.
Notification type
One of the following: EventTriggered Digest
Type of notification: send on event or send periodical digest.
Email send type
One of the following: SingleEmail SeparateEmails
Displayed only if [Advanced] is selected as Configuration mode. SingleEmail. If this option is selected, rule will send one combined email. SeparateEmails. If this option is selected, rule will send one email to each email specified in ‘To’ section of configuration (and separate to everyone who edited the object if this flag is true). Note: All emails will have same cc, bcc, subject and body.
Notify everyone who edited object
Yes/No
Displayed only if [Advanced] is selected as Configuration mode. If this is set to Yes, all users who edited the object will be added as recipients of e-mail.
Search Timeout (seconds)
Integer
Displayed only if [Advanced] is selected as Configuration mode. This timeout is applied to any search that is executed inside operation.
Delivery notifications
Yes/No
Request delivery notifications from server for sent e-mails. Currently, if this is set to yes it will add an .eml file on source object.
Business critical
Yes/No
If set to true, rule will be logged in SEQ.
Rule group> Group > Rules > Rule [n] > EventTriggered
Trigger
One of the following: ObjectCreated ObjectChanged ObjectEnteredState OnComment Scheduled RunOnce
Type of event that triggers the execution of this rule. ObjectCreated. If this option is selected, rule will be executed when source object is created. ObjectChanged. If this option is selected, rule will be executed when source object is changed. ObjectEnteredState. If this option is selected, rule will be executed when source object has entered a new state. OnComment. If this option is selected, rule will be executed when new comment is written to source object.
One of the following: Once Daily Monthly Weekly Yearly
A periodical digest is meant to check if the specified property is changed in periodic time (hourly, daily, weekly, etc.) and send emails. For digest check, user need to specify which properties are used for tracking in the Monitored properties field.
Workflow state of source object. NOTE! If you have entered a state, you must also enter the workflow above.
Search filters
List of search filters
List of search filters, any of which the source object needs to satisfy.
Look in
One of the following: Latest obj version All obj versions
When trying to matching source conditions, look in all object versions, or only the latest one. Latest obj version. If this option is selected, the current object version must match the specified conditions for object to be treated as source for this rule. All obj versions. If this option is selected, any object version must match the specified conditions for object to be treated as source for this rule.
Optional additional conditions that source object needs to satisfy. Conditions inside a single filter are combined with AND, while multiple filters are combined with OR operator.
Displayed only when Trigger is ObjectChanged. Rule will be triggered only if any of specified properties has changed. If no property is specified rule will be triggered on any object change.
Rule group> Group > Rules > Rule [n] > E-mail > To [n] > Recipient [n]
Recipient type
One of the following: UserGroup Dynamic
User. E-mail will be sent to user’s e-mail address as defined in M-Files admin. Group. E-mail will be sent to all group members’ e-mail addresses as defined in M-Files admin. Dynamic. E-mail will be sent to dynamically resolved e-mail address.
User
User
Displayed only when Recipient type is User.
Group
User Group
Displayed only when Recipient type is Group.
Value
Text with placeholders
Displayed only when Recipient type is Dynamic. Can be static e-mail address, or property on expression on source object that will resolve to an e-mail address, user, or user group.
Rule group> Group > Rules > Rule [n] > E-mail > CC [n]
Recipient type
One of the following: UserGroup Dynamic
User. User’s e-mail address as defined in M-Files admin will be added to CC. Group. All group members’ e-mail addresses as defined in M-Files admin will be added to CC. Dynamic. Dynamically resolved e-mail address will be added to CC.
User
User
Displayed only when Recipient type is User.
Group
User group
Displayed only when Recipient type is Group.
Value
Text with placeholders
Displayed only when Recipient type is Dynamic. Can be static e-mail address, or property on expression on source object that will resolve to an e-mail address, user, or user group.
User. User’s e-mail address as defined in M-Files admin will be added to BCC. Group. All group members’ e-mail addresses as defined in M-Files admin will be added to BCC. Dynamic. Dynamically resolved e-mail address will be added to BCC.
User
User
Displayed only when Recipient type is User.
Group
User group
Displayed only when Recipient type is Group
Value
Text with placeholders
Displayed only when Recipient type is Dynamic Can be static e-mail address, or property on expression on source object that will resolve to an e-mail address, user, or user group.
Subject
Text with placeholders
Subject of the email that will be sent.
Body
Text with placeholders
Body of the email that will be sent.
BodyType
One of the following: PlainText HTML
Type of body type of the email that will be sent. PlainText. If this option is selected, email body will be sent as plain text. HTML. If this option is selected, email body will be sent as HTML.
Rule group> Group > Rules > Rule [n] > E mail > Attachments [n]
Mode
One of the following: CustomObjectS ourceObject Reference
Object selection mode. CustomObject. Select any custom object from vault. SourceObject. Select current source object. Reference. Select any reference of the source object.
Filename wildcard
Text
Filename wildcard used to select file from object.
Reference expression
Reference
Displayed only if [Reference] is selected as a mode. Property reference expression.
Rule group> Group > Rules > Rule [n] > E mail > Attachments [n]> Custom object
Search Conditions
Conditions
Optional list of conditions that must be satisfied for finding custom object.
Optional list of conditions that must be satisfied in vault in order for this rule to be executed.
Search result type
One of the following: Any None
Any. If this option is selected, the vault search will be considered satisfied if at least one matching object is found in vault. None.If this option is selected, the vault search will be considered satisfied if no matching objects are found in vault.
One of the following: Dynamic value Static value Empty value No action
Dynamic value. If this option is selected, comparison value will be created dynamically from source properties. Static value. If this option is selected, comparison value will be created statically i.e. constant value. Empty value.If this option is selected, comparison value will be empty. No action. If this option is selected, no action will be performed. This is invalid state.
Dynamic value
Placeholder editor
Displayed only if Dynamic value is selected as a mode. Specifies search comparison value using properties from source object.
Static value
Text
Displayed only if Static value is selected as a mode. Specifies constant search comparison value.
Advanced settings
Retry interval (milliseconds)
Integer
Retry time interval for failed actions
Number of retries
Integer
Maximum numbers of times COM errors are retried.
Time to wait (milliseconds)
Integer
Number of milliseconds to wait before executing any rule in background.
Periodic check frequency (minute)
Integer
Time in which program will periodically check digest rules.
Use Case
Send notification that Deal end date has been changed
Customer is using M-Files to control deals with other partners about business licenses renewals. When contract is near expiring, their legal team is notified three months before, so that can start working on a new condition for next year lease. They are notified by Extended Notification rule and then when they negotiate new terms and sing new contract, Deal is extended. When Deal is extended, their management is notified by Extended notification with all necessary details.
Configuration
Every contract has Responsible person who is notified when contract is expiring, and every Deal have Responsible person who is notified when End Date is changed, Picture 1.
Picture 1. M-Files simplified structure
Customer is monitoring Expiring (days) property, and action is triggered when expiring is equal to 90 days.
Picture 2. Configuration – Source and trigger
When specific object is changed, rule will be triggered and we will send notification to a responsible person, or Person.Login, where Login is list of M-Files login accounts, Picture 3.
Picture 3. Configuration – E-mail
Picture 4. Configuration – Deal End Date has changed
Sending attachment with e-mail
Customer wants to send only PDF document in attachment when Project entered state Approved.
Configuration
Result
Send notification when training schedule has been changed
Customer is using M-Files for a training management. When training schedule is changed, all other participants are notified that schedule has changed.
Send notification when customer is having a birthday
Customer is using M-Files as a CRM. They KAMs are notified when their customer is having a birthday.
M-Files Email Processor is a standalone rule-based application designed for the most common scenarios – when integrating an email with M-Files. M-Files Email Processor allows a user to configure the rules and exceptions under which the email will be stored. You can create new or update existing M-Files object and map fields from an email into object properties.
1. Installation
The groundwork is easy, the installation is done on the same server where the M-Files server is installed.
After that, you need to configure an access to your mailbox and connect it to the desired vault. Voila!
1.1. Installation and preparation
Well, it’s not all that simple, there are some prerequisites for the installation of the product:
Microsoft SQL Server
M-Files Email Processor uses SQL Server as an underlying database to store the configuration and runtime setup. To be able to install M-Files Email Processor, you need SQL Server, database, one account that installs schemas to the database and one account that is used in runtime (this can be one account in case you don’t have granular permissions configured on that database). SQL Server doesn’t have to be installed locally.
M-Files server
M-Files Email Processor uses M-Files API to communicate to vaults and therefore needs M-Files Server to be installed locally. Without the local M-Files Server, M-Files Email Processor cannot be installed.
Installation is done in a few simple steps:
Get the installation file at our Product page. Register for a trial and download a free trial setup or request a full version.
Start the setup on a Windows based machine with M-Files server installed.
Click Next-Next-Finish if you need only the basic and default settings. Otherwise, check the list of installation steps and adjust certain settings if needed.
List of installation steps:
EULA: End User License Agreement, you should agree to, if you want to continue with the installation and use the product.
Start Menu Folder: Folder name in the start menu, which can be disabled.
Additional Tasks: Miscellaneous install options:
Icons – Create desktop shortcut: Choose whether to create a desktop shortcut, or not.
Configuration – Force configuration for Service and Configurator: choose whether the Configuration Setup (see below) should be run at the end of the setup, or not. This is recommended if you’re installing M-Files Email Processor for the first time. If M-Files Email Processor has already been configured on this machine, just skip this part.
Ready to Install: Summary page that shows all the selected options.
Installing… At this point, if it was checked, M-Files Email Processor Configuration Setup started.
Finished!
1.2. Email Processor Configuration Setup
Email Processor Configuration Setup is a small configuration/setup application that allows simple and quick initial configuration of M-Files Email Processor Service.
Steps of Email Processor Configuration Setup:
License: enter the license code that you got from us. Configuration Setup cannot continue if the license code is not entered. If you do not have a license, you can always request for a trial or full license at our Product page.
SQL Server – Schema installation: Set up a connection to SQL Server that will be used by M-Files Email Processor.
Server name: name of the SQL Server. Enter “.”(dot) if SQL server is installed locally.
Account type: this account is used only for the installation
Integrated Security – uses the account that runs the setup, and that account must have all the database privileges to install the database (DB Owner)
Specific Account – Enter username and password of the specific account that will be used to install the schema into the database (DB Owner)
Database Name: name of database where you want to install all schema and tables and other artifacts needed by M-Files Email Processor.
: At this point, you cannot create a new database, only add a schema information to the existing one. If you want a new database for M-Files Email Processor, create a new database manually and refresh the list of the databases on the server, either by going back and then clicking next, or re-enter the information on the page for a force refresh of the drop-down menu. Note
SQL Server – User configuration: Sets up an account for service to run under.
Account type: Type of account for service
Integrated Security: Uses LocalSystem account for the M-Files Email Processor Service ii. Specific Account: Enter username and password of the specific account for the M-Files Email Processor Service
Test connection button: test the connection with the chosen server/database with the provided account. Use this if you want to make sure that all the provided information on that page is correct.
Errors
If something went wrong while installing M-Files Email Processor, note that all the errors are written down to files in folder:
C:\Program Files (x86)\M-Files Email Processor\logs\setup or C:\Program Files\M-Files Email Processor\logs\setup depends on 32-bit or 64-bit systems.
2. Configuration
M-Files Email Processor Configuration is a small administrative application that is used to configure all parts of M-Files Email Processor. It is used to configure M-Files vaults connections, input mailboxes, output mailboxes, log types etc. But its main purpose is to configure M-Files Email Processor process, which connects email (Mailbox) using some Filters with M-Files Vaults using some Actions.
Mailbox – email that is used as a source, all mails will come from this one specified mailbox
Filters – determine which emails will be received from Mailbox
M-Files Vault – no extra explanation 🙂
Action – what to do with the fetched email in vault
M-Files Email Processor Configuration main window displays a searchable list of all created processes with their statuses. From that window you can add new processes, Start/Stop entire service and open process details by clicking on desired process. Also, the window offers left side navigation with different parts of application.
Every Process has one Mailbox, one or more Filters, one Vault connection and one or more Actions. But before we can configure the process, we need to set at least one Mailbox and at least one M-Files Vault connection. Configurator will remind us of that if we click on Add New button, but don’t have all configured.
2.1. Email Accounts & M-Files Connections
First step is to prepare our M-Files Connection by clicking on the M-Files Connection button.
M-Files Connections
Here we can manage all connections to all needed M-Files vaults. To add a new vault information, click “Add new” button. Then, a new window will pop up for you to enter information about vault connection. User interface set up is very similar to setting up a vault connection with M-Files Desktop. When populated, window looks like this:
Description of the fields on the Document Vault Connection Properties window:
Name: Friendly name of the vault that will be used by M-Files Email Processor. This name doesn’t depend on the Vault name
Server: Information about the M-Files server. This could be, but doesn’t have to be, a local server.
Name: Name or Fully Qualified name of the server, e.g. MyComputer or MyComputer.MyCompany.com. If the server is a local server on which M-Files Email Processor is installed, enter “localhost”
Port number: Port that is used for the communication with the server. All M-Files servers are listening on port 2266 by default.
Protocol: Protocol used for communication with the M-Files server. At the moment, the only protocol that is enabled is the TCP/IP protocol.
Test connection button: testing the connection only to M-Files server to see if it is available.
Logon information: Account that is used to connect to M-Files server/vault. This account is used to load all vaults from server and to connect to the specified vault, so it needs to have proper permissions on M-Files server.
Authentication: type of an account: M-Files user or Windows user.
Username: account username.
Password: account password.
Domain: account domain, enabled only for windows user accounts.
Vault on server: specifies to which M-Files vault you want to connect to. This is a dropdown menu which is populated only when a connection to the server is possible.
Load button: Loads all vaults from M-Files server if it is possible. If server is inaccessible, error popup is raised, and dropdown menu is not populated.
Note: Without specifying the vault, connection information cannot be saved, and OK button is greyed out. Only after specifying the vault, OK button will be enabled. That also means that all the previous information must be correct.
Note: All required, but empty fields have red rectangles around text box. Connection information cannot be saved if some of the required fields are empty, so make sure to enter all the needed information.
After saving the connection settings, a vault can be used in setting up a new process in M-Files Email Processor.
Mailbox Connections
On this screen, we can see and setup all the incoming and outgoing emails/mailboxes. They are used for monitoring emails from which you want to parse information that can be imported to M-Files vault. In case of outgoing connection, it is used by M-Files Email Processor to send emails. The configuration process is similar to the one shown for incoming mail accounts.
To add new mailbox information, open Email Accounts screen via the side menu. Then, you can click “Add new” button and enter your desired information.
When a new mailbox information is entered, popup window will look like this:
Additional information in the email account settings window:
Email Address: Friendly name of an email that will be used by M-Files Email Processor. This name doesn’t depend on the email address that is used to log on to the account (it is not depended on real email address?)
Server Information: Information about mail server to which M-Files Email Processor will connect to.
Load settings from template: choose a template to pre-populate Server Information fields. Currently existing templates are Hotmail, Gmail, G Suite, Office 365.
Account type: defines protocol type for getting emails from mailbox. Currently only the existing type is IMAP.
Incoming mail server: Name of the mail server to which the M-Files Email Processor will connect, to get the emails. It can be pre-populated with the template field or ask your system administrator to tell you the name of your mail server.
Port: Port used to connect to mail server.
Require secured connection: choose whether to use SSL when connecting to mail server or not.
Logon Information: Account information that is used when authenticating on mail server, Also, defines an account from which we will get emails.
Username: login account username.
Password: login account password.
After saving mailbox information, incoming mailbox can be used when creating a new Process.
Account blocking
Some mail providers, like Hotmail/Outlook or Google/Gmail can mark M-Files Email Processor’s connection to mailbox as suspicious. Because of that, initially connection to your mailbox can be denied from the mail server and it has to be manually approved.
You can receive an email from your provider in which they state that you had a new connection on your mailbox, e.g., Microsoft email can look like the one below, stating that you have to confirm that it was you:
After clicking on that link, Microsoft shows you more details about the actual connection:
While IP address and location will vary depending on where the server with M-Files Email Processor is installed, Session Type will always be Automatic Sync and protocol will be IMAP. After clicking on That was me button, M-Files Email Processor will successfully connect to mailbox.
2.2. Process Configuration
After a successful configuration of the M-Files connections and Email accounts you can create processes that actually fulfil your needs.
After opening the Processes screen and clicking on “Add new process” you will see Process Settings window.
General
The first tab is “General” where you define general settings for wanted process. Here you can also define:
Process Name: the name of your process which will be shown on the Home Screen.
Email account to monitor: here you have to define which email account you want to monitor with this process. The list displays all the incoming email accounts configured in Settings.
M-Files connection: here you have to define which M-Files connection you want to use for this process. The list displays all configured M-Files connections configured in Settings.
Object class: based on your selected M-Files connection, here you will see the list of all the object classes fetched from your M-Files vault. You have to select object class with which you want to process work.
Disable process checkbox: Check if you want to disable the process.
Delete email after import checkbox: This option allows you to delete an email once it is imported and processed by M-Files Email processor
Mark email as read after import: This option allows you to mark an email as read once it is imported and processed by M-Files Email processor
Apply on newly received emails and Apply on old and new emails radio buttons: Here you can choose whether you want to apply this process settings on newly received emails or you want to process both newly received emails together with the old emails in the mailbox.
Next thing you may want to configure are Conditions and Exceptions. For that you can use Conditions and Exceptions tabs.
Conditions and Exceptions
On both Conditions and Exceptions, you see the list of available options for processing emails. You can specify as many conditions and exceptions as you need. After you select exception or condition you want to setup you will see the List Input pop-up window.
From that window you can define a word or a phrase to search for in the selected field (subject, To:, Body:, etc.). After you specify a word or a phrase you have to select Add and that specified word, or a phrase will be added to the List. List displays all specified words or phrases, and you can always remove some of them by selecting Remove.
Create or Update Object
Next available tab in the Process Settings window is Create or Update Object tab. Here you define main rules for creating and updating objects based on emails that satisfy defined objects and conditions.
The first thing you have to decide is whether you want to create a new M-Files object or you want to update the existing one. For that you have to select either Create new object or Update existing object radio button.
Create new object
After you select Create new object radio button you will see the list of properties for an object class you selected on the General tab.
Whether you select Add button or click on a specific property and select Edit, the Property Editor window will be displayed. The only difference between Add and Edit is that when you select Add you will be able to select the property from the list of available properties for a selected M-Files object class.
From this window you can define whether you want to use a fixed value for property or you want to read value from an email.
If you want to use a fixed value in a Value field you have to define the value you want to add for a selected property. This field recognizes property type and it will display an adequate input field. For example, if you select property of type Date you will see the date picker.
Read from email option allows you to compose a value from the different parts of an email. You can read values from:
To:
Subject:
MessageId:
From:
Date:
Cc:
TextBody:
By simply clicking on the wanted field you compose your value. All the selected fields will be added to Compose value: field.
ou can remove some of the added fields with Backspace on your keyboard.
RegEx Placeholder Editor windows allows you to add Regular Expression and parse information from the selected email field. You can add and edit regular expression by clicking on added email field.
From that window you can enter the regular expression you want to use to parse the information. Additionally, you can test your regular expression with the test input. Once you input your test values you can click on the Test RegEx button which will display the result in RegEx Match Result field.
After you define properties and values you want to map to M-Files you can choose what you want to do with the email attachments.
Picture above displays available options for parsing email attachments.
Update Existing Object
If you decide to update existing object you will see Update existing object tab.
Here, you define which M-Files object will actually be updated. You can do that by clicking on a Map Value button which opens Property Editor window, the same one as for defining values when creating a new object. Once again you can choose if you want to use a fixed value, or you want to parse an Object ID from the email. Process of gathering value from the email is the same as described for Creating a new object.
Once you define the Object ID for the Object that you want to update, you can set the values for each property.
The last option to configure for the process is Send email.
Send email
By selecting Send email after processing checkbox, your process will send an email once the processing of the incoming email is done. In order to configure sending an email you have to select an email account that you want to use for sending emails. From the list, you have to select which email account you want to use. This list displays all the configured outgoing email accounts from the Settings.
After that, you need to define Recipients, Subject and Message.
Recipients tab allows you to define who will receive an email once the Email Processor is done with the processing of an email. Here you have two checkboxes:
Include recipients of the original email
Include sender of the original email
Besides that, you can define a list of additional recipients. By clicking on Edit additional addresses you will get a List Input window from where you can define a list of additional email addresses.
Subject tabs allow you to define the subject of an outgoing email.
Compose Subject field allows you to define any subject name but also to use some placeholders from M-Files objects. Clicking on Add Placeholder button will show you the list of available placeholders you can use for Subject line.
Finally, you need to define the content of the message that is going to be sent.
Easily manipulate values and properties when a trigger happen.
Copy property from one object to another based on triggers
Change all properties based on rule only once
Configuration
After you have successfully installed the application, you should configure Extended property operations.
Open M-Files Admin
In the left-side tree view, expand the desired connection to M-Files Server.
In the left-side tree view, expand the Document Vaults node.
Still, in the left-side tree view, expand the vault where you installed the connector and select Configurations.
Expand Other Applications.
Expand Extension Kit for M-Files.
Expand Configuration.
Click on Extended property operations.
Field Description
Field
Value
Description
Enabled
Yes/No
Specifies whether the module is in use.
Rules > Rule [n]
Name
Text
Specifies the name of the rule.
Enabled
Yes/No
Specifies whether the rule is in use.
Trigger
One of the following: • Object created • Object entered state • Object Changed • RunOnce
Object created. If this option is selected, rule will be executed on creation of source object. Object entered state. If this option is selected, rule will be executed when source object changes workflow state. Object changed. If this option is selected, rule will be executed when any change is made on source object. On comment. If this option is selected, rule will run whenever a comment is added to the source object. Run once. If this option is selected, rule will be run only once and on all matching objects in vault. NOTE: On vault restart, all enabled rules with Run once trigger will be run immediately.
Copy mode
One of the following: • From source to target • On source object
From source to target. Properties will be copied between two different objects (from source to target). On source object. Properties will be copied on single source object.
Business Critical
Yes/No
If set to true, rule will be logged in SEQ.
Update metadata in file
Yes/No
When object metadata is changed it will be automatically updated in document associated with it. All changes will be available in preview card with no need for check out.
Execution mode
One of the following: • EventHandler • Background
Defines when rule is executed: EventHandler: during object check in. Background: in background, after object has been checked in. If this setting is not set, execution mode is controlled by Copy Mode setting and the following rules apply: – FromSourceToTarget rules are executed in background. – OnSourceObject rules are executed in event handler.
Property definition that needs to change in order for rule to be executed. Multiple properties are combined with OR operator, meaning that at least one of the properties has to change in order for rule to be executed.
Rules > Rule [n] > Source
Object type
Object type
Object type of the source object.
Class
Object class
Class of the source object.
Workflow
Workflow
Workflow of the source object.
State
Workflow state
Workflow state of source object. NOTE! If you have entered a state, you must also enter the workflow above.
Look in
One of the following: • Latest obj version • All obj versions
When trying to matching the above source conditions, look in all object versions, or only the latest one. Latest obj version. If this option is selected, the current object version must match the specified conditions for object to be treated as source for this rule. All obj versions. If this option is selected, any object version must match the specified conditions for object to be treated as source for this rule.
Optional additional conditions that source object needs to satisfy. Conditions inside a single filter are combined with AND, while multiple filters are combined with OR operator.
Rules > Rule [n] > Target
FindTargets
One of the following: • ViaProperty • ViaSearch
ViaProperty. If this option is selected, property reference will be used to find targets for this rule. ViaSearch. If this option is selected, vault search will be executed to find targets for this rule.
Reference
Property definition
Displayed only when FindTargets is ViaProperty. Property definition that defines the connection between source and target objects.
Reference Direction
One of the following: • Direct • Indirect
Displayed only when FindTargets is ViaProperty. Direct. If this option is selected, the source object references a target object via given reference. Indirect. If this option is selected, a target object references the source object via given reference.
Filter Conditions
Search conditions
Displayed only when FindTargets is ViaProperty. Optional additional conditions that target object needs to satisfy.
Target search
Search conditions
Displayed only when FindTargets is ViaSearch. Search conditions used to find targets for this rule.
Specifies the property whose value will be checked.
Operator
One of the following: • = • =! • < • > • <= • >= • Contains • Does not contain • Starts with • Does not start with
Operator to use for comparing actual and expected property value.
Value
Property value
Expected property value. Can be static or dynamic, from source object.
Mode
One of the following: • Dynamic value • Static value • Empty value • No action
Dynamic value. If this option is selected, value of placeholders in expression will be calculated from source object. Static value. If this option is selected, property value will be expected to match constant value. Empty value. If this option is selected, property value will be expected to be empty. No action. If this option is selected, no action will be performed. This is invalid state.
Dynamic value
Text with placeholders
Displayed only if Dynamic value is selected as Mode. Specifies expected property value using properties from source object.
Static value
Text
Displayed only if Static value is selected as Mode. Specifies constant expected property value.
Controls how the value of property will be calculated: directly by copying value from source or as function of selected property values.
MultiSelectLookup Behaviour
One of the following: • Overwrite • Append
Displayed only when Value Type is Value. If property is multi select lookup, this setting controls how the selected value will be added: overwriting existing ones or appending.
Add as additional property
Yes/No
If this option is set to Yes, and the specified property does not exist on target object, it will be added as additional property to that object. If this option is set to No, property will be set only if it exists on object.
Update option
One of the following: • Always • Only when target empty • Only when source not empty
Always. If this option is selected, target property value will always be updated. Only when target empty. If this option is selected, target property value will be updated only when it is found to be empty (execute once and do not override). Only when source not empty. If this option is selected, target property value will be updated only when at least one of the selected source property values is not empty (do not update target with empty value).
Type of function that will be used to calculate property value.
Function
When Functions group is Text, one of the following: • Concatenate • ToLower • ToUpper • ToLowerInvariant • ToUpperInvariant When Functions group is Date, one of the following: • AddDays • AddMonths • AddYears When Functions group is Numeric, one of the following: • Sum • Multiply • Average
Function that will be used to calculate property value.
One of the following: • Dynamic value • Static value • Empty value • No action
Dynamic value. If this option is selected, target property value will be created dynamically from source property value. Static value. If this option is selected, target property value will be created statically i.e. constant value. Empty value. If this option is selected, target property value will be empty. No action. If this option is selected, no action will be performed. This is invalid state.
Dynamic value
Placeholder editor
Displayed only if Dynamic value is selected as a mode. Specifies dynamic value (using properties from source object) that will be set as target property value.
Static value
Text
Displayed only if Static value is selected as a mode. Specifies constant value that will be set as target property value.
Rules > Rule [n] > Vault search > Search [n]
Conditions
Property definition
Optional list of conditions that must be satisfied in vault in order for this rule to be executed.
Search result type
One of the following: • Any • None
Any. If this option is selected, the vault search will be considered satisfied if at least one matching object is found in vault. None. If this option is selected, the vault search will be considered satisfied if no matching objects are found in vault.
One of the following: • Dynamic value • Static value • Empty value • No action
Dynamic value. If this option is selected, comparison value will be created dynamically from source properties. Static value. If this option is selected, comparison value will be created statically i.e. constant value. Empty value. If this option is selected, comparison value will be empty. No action. If this option is selected, no action will be performed. This is invalid state.
Dynamic value
Text with placeholders
Displayed only if Dynamic value is selected as Mode. Specifies search comparison value using properties from source object.
Static value
Text
Displayed only if Static value is selected as Mode. Specifies constant search comparison value.
Use Cases
Copy extended contract date to a customer deal
Customer in the food industry is using M-Files to track all franchise agreements with all their partners/franchises which are companies. They have an open deal with every partner, which has a start and end date. Every year they sign a new contract and the partner’s deal (license) is extended. A simplified diagram of a solution is shown in picture 1.
Picture 1. Simplified diagram
Contract management and lifecycle is based on M-Files contract management examples, as shown in picture 2. The name of this workflow is “Contract Lifecycle”.
Picture 2. Contract lifecycle
Customer is notified three months prior to any partner’s contract expiration and that’s when negotiations for the new contract commencing. When a new contract becomes active, deal with that partner is extended to one more year and the new Contract’s End Date is copied to Deal End Date using Property operation. An example of an execution diagram is shown in picture 3.
Picture 3. Use case example
Configuration of Property operations
We need to filter out a contract in a Contract Lifecycle workflow entering state Active. To better understand, we have a demo object Deal that has an end date of 31.12.2019. (Picture 4.) with a current active contract (Picture 5).
Picture 4. Object Deal
Picture 5. Expired Contract
Our new Contract is ready to become Active and we need to configure Property operation rule that will automatically copy its End Date to the related Deal.
Name
User-defined custom name.
Enabled
Yes.
Trigger
As we want copy action to happen when an object enters state Active, we should use ObjectEnteredState trigger.
Source
Source object is the one that triggers the copy. We want to copy End Date when the Contract becomes Active.
Picture 6. Configuration of Source object
Target
Object where we want to copy or set property value.
Reference
Property from Source that is pointing/is connected to Target. In our case, that is the property Deal (list of Deals).
Reference Direction
Direct. Source property (Contract) has reference property (Deal).
Picture 7. Configuring Target
Picture 8. Configuring properties
Properties
List of properties that we want to change.
Property
Property that we want to set on target. End Date.
Value
Value of property we wish to set. We want it to be a dynamic copy of the source object’s End Date, so that every time contract enters state Active, its End Date is copied to the related Deal.
Mode
Dynamic.
Dynamic Value
Here we set source property we wish to copy – End Date.
Update option
We want to update Deal’s End Date property every time Contract enters Active state, so we set this option to Always.
When the Contract enters Active state (Picture 9.), its Deal will have updated End Date (Picture 10.).
Picture 9. Active Contract
Picture 10. Changed End Date of Deal
Copy First name and Last name “Employee protected data” to “Employee”.
If you have Employee protected data where you keep all personal and sensitive information about employees (by GDPR) and Employee data with connection to Employee protected data, you can copy values from Employee protected data to Employee data. This way, user doesn’t have to enter same data twice (thus eliminating possibility of error) and you can use all the same properties.
Set Employee Period Start and End Date
If you are using M-Files HR vault, you can use Property operations to set up Start Date and End Date of „Employment Period“, when Employee Contract becomes active or when an annex to the contract is added. You can have many rules.
Set opportunity to Won when Offer is Accepted
With Property operations you can also manipulate other object workflows. If you are using M-Files as a CRM, you can change object Opportunity state to Won when document Offer is Accepted.
Calculate object properties based on referenced properties and their values like parent-child relationship. One of the many ways to use this module is for calculate open tasks/assignments per project, sum logged hours on projects etc.
Configuring Property calculations
After you have successfully installed the application, you can start adding calculation rules.
Open M-Files Admin
In the left-side tree view, expand the desired connection to M-Files Server.
In the left-side tree view, expand the Document Vaults node.
Still, in the left-side tree view, expand the vault where you installed the connector and select Configurations.
Expand Other Applications
Expand Extension Kit
Click on Extended property calculations
Field Description
Field
Value
Description
Enabled
Yes/No
Specifies whether the module is in use.
Rules > Rule [n]
Name
Text
Custom rule name.
Enabled
Yes/No
Specifies whether the rule is in use.
Mode
One of the following: • ParentChildren • SingleObject
Calculation mode of this rule. ParentChildren. If this option is selected, the property used to store calculation results and the properties used for calculation are properties of separate objects in parent-children relationship. Eq. property Price on Project object could be calculated as sum of Price on Task objects related to that Project. SingleObject. If this option is selected, both the properties used for calculation and the property used to store calculation result are properties of the same object.
Trigger
One of the following: • ObjectCreated • ObjectChanged • ObjectEnteredState • RunOnce
Type of event that triggers the execution of this rule. ObjectCreated. If this option is selected, rule will be executed whenever parent or child objects are created. ObjectChanged. If this option is selected, rule will be executed when parent or child objects are changed. ObjectEnteredState. If this option is selected, rule will be executed parent or child objects have entered a new state. Run once. If this option is selected, rule will be run only once and on all matching objects in vault. NOTE: On vault restart, all enabled rules with Run once trigger will be run immediately.
Update option
One of the following: • Always • OnlyWhenTargetEmpty • OnlyWhenSourceNotEmpty
Always. If this option is selected, property value will be recalculated whenever the rule trigger is matched. OnlyWhenTargetEmpty. If this option is selected, property value will be updated with the result of calculation only if the existing value is empty – once calculated, non-empty property value will not be overridden. OnlyWhenSourceNotEmpty. If this option is selected, property value will be updated with the result of calculation only if the result is not an empty value – empty value will never override the existing one.
Calculated property
Property definition
Property that will be holding the calculated value.
Calculation Properties
List of property definitions
Properties that will be used in calculation.
Function
One of the following: • Sum • Multiply • Average • Min • Max • First • Last • Concatenate
Function to apply to calculate properties. Sum. Valid for numeric and lookup based properties. Multiply. Valid for numeric properties only. Average. Valid for numeric properties only. Min. Valid for numeric, as well as text, date and lookup-based properties. Max. Valid for numeric, as well as text, date and lookup-based properties. First. Valid for numeric, as well as text, date and lookup-based properties. Last. Valid for numeric, as well as text, date and lookup-based properties. Concatenate. Valid for all property types.
Order by
Property definition
Displayed only when Function is one of the following: Min, Max, First or Last. If calculated properties are lookups to objects, they will be ordered by the selected property.
Parent object
Object
Displayed only when Mode is ParentChildren. Parent object filter.
Source object
Object
Displayed only when Mode is SingleObject. Source object filter.
Business Critical
Yes/No
If set to true, rule will be logged in SEQ.
Update metadata in file
Yes/No
When object metadata is changed it will be automatically updated in document associated with it. All changes will be available in preview card with no need for check out.
Rules > Rule [n] > Parent object
Object Type
List of object types
Object type of parent object.
Class
List of classes
Class of parent object.
Workflow
List of workflows
Workflow of parent object.
State
List of workflow states
Workflow state of parent object.
Search filters
List of search filters
List of search filters, any of which the parent object needs to satisfy.
Optional additional conditions that parent object needs to satisfy. Conditions inside a single filter are combined with AND, while multiple filters are combined with OR operator.
Rules > Rule [n] > Trigger object
Object Type
Object Type
Object type of source object.
Class
Class
Class of source object.
Workflow
Workflow
Workflow of source object.
State
State
Workflow state of source object. Note! If you have entered a state, you must also enter the workflow above.
Search filters
List of search filters
List of search filters, any of which the source object needs to satisfy.
Optional additional conditions that source object needs to satisfy. Conditions inside a single filter are combined with AND, while multiple filters are combined with OR operator.
Rules > Rule [n] > Children Objects
Relationship Mode
One of the following: • All • FromParentToChildren • FromChildrenToParent
Type of relationship between parent and children objects. All. When this option is selected, both parents can have reference to children and vice versa. FromParentToChildren. When this option is selected, parent must have reference to children. FromChildrenToParent. When this option is selected, children must have reference to parent.
Relationship Property
Property definition
Relationship property between parent and children objects. If not set, any property can be used as relationship.
Object Type
List of object types
Object type of children objects.
Class
List of classes
Class of children objects.
Workflow
List of workflows
Workflow of children objects.
State
List of workflow states
Workflow state of children objects.
Look in
One of the following: • LatestObjVersion • AllObjVersions
When matching trigger object, look in all object versions, or only the latest one. LatestObjVersion. If this option is selected, the current object version must match the specified conditions for object to be matched as source for this rule. AllObjVersions. If this option is selected, any object version must match the specified conditions for object to be matched as source for this rule.
Search filters
List of search filters
List of search filters, any of which the children’s objects need to satisfy.
Optional additional conditions that children objects need to satisfy. Conditions inside a single filter are combined with AND, while multiple filters are combined with OR operator.
Rules > Rule [n] > Vault search > Search [n]
Conditions
Property definition
Optional list of conditions that must be satisfied in vault in order for this rule to be executed.
Search result type
One of the following: • Any • None
Any. If this option is selected, the vault search will be considered satisfied if at least one matching object is found in vault. None. If this option is selected, the vault search will be considered satisfied if no matching objects are found in vault.
One of the following: • Dynamic value • Static value • Empty value • No action
Dynamic value. If this option is selected, comparison value will be created dynamically from source properties. Static value. If this option is selected, comparison value will be created statically i.e. constant value. Empty value. If this option is selected, comparison value will be empty. No action. If this option is selected, no action will be performed. This is invalid state.
Dynamic value
Placeholder editor
(Displayed only if Dynamic value is selected as a mode) Specifies search comparison value using properties from source object.
Static value
Text
(Displayed only if Static value is selected as a mode) Specifies constant search comparison value.
Use Cases
Sum spent hours on project and tasks
Customer is big Pharmaceutical company and they are using M-Files as a Project Management solution. They simplified structure have Projects, Tasks and Hour Logging Events, like in Picture 1.
Their Project Managers would like to know at each moment how much time is spent working on a project per each task, as those projects usually takes a bit long. They have configured Calculated properties in two ways:
Have information on a Project about all hours spent on Tasks
Have information on a Task about all hours spent
Configuration of Property calculations
In Picture 2 we can see hierarchy of objects. In M-Files that hierarchy looks like in Picture 3. To configure Extended property calculations, we must be aware of that hierarchy or Parent-Child relationship. In customer cases:
Project is parent and Task is child
Task is parent and Hour Logging Event is child
Picture 3. M-Files implementation structure
Sum spent hours on a task
Picture 4. Object “Task“
We will create first rule for summing all hour logging events on tasks. Configuration is shown on Picture 5. We would like that summarizing happen when object is changed (Hour logging event). Parent object is Task and property on task object is Total work (h).
Picture 5. Parent object and property
Children objects are Hour Logging Events (Picture 6) and they have connection to a Task. That’s why Relationship model is from ChildrenToParent and property that connect them is Task (Picture 7).
Picture 6. Hour Logging EventPicture 7. Children objects
Property that we want to sum its Logged Work (h) from Hour logging events. Function that we are using its SUM (Picture 8).
Picture 8. Calculation properties and function
In this case when we add new hour logging event it will be summed and added to related Task object (Picture 9).
Picture 9. Calculated property Total work (h) in action
Sum spent hours on a project
The way to sum all spent hours per project (Picture 10) is same as for Tasks expect now Parent is Project and Children are Tasks.
Picture 10. Project
Property that connect Tasks and Project is property Project on a Task object (Picture 11).
Picture 11. Configuration of rule for sum all tasks per project
The results are seen on Picture 12, how all Total work (h) from Tasks are summarized to Project.
Picture 12. Calculated property in action on Project object
Count opened tasks on project
Customer that is using M-Files as Project Management is counting opened tasks per project. Every task is going trough workflow and final state is Closed. In every moment Project Manager can see how many opened tickets they have on each project without opening views.
Count opened assignments per person
Customer wanted to have information of how many opened tasks are per Person. That information was on a Person object. With customer we have tested different gamification and motivational methods and counting opened assignments was one of them that took effect in productivity.
Count opened tickets per customer
Customer is using M-Files as a ticketing system with help of M-Files E-mail processor. They are counting how many opened tickets they have per customer and how many total ticket they have. To gain that quick information
Auto properties module extends property concatenation expression language with additional macros for text formatting and translation, date manipulations and numeric calculations. When property concatenation expression contains any of the supported macros, it is automatically converted into calculated property and its new value is calculated.
Gets difference between two date properties or expressions. Units can be any of the following: • YEARS • MONTHS • WEEKS • DAYS Eq. <<DATEDIFF(‘<<TODAY>>’, ‘%PROPERTY_20%’, ‘DAYS’)>> calculates age of any object (difference between current date and document’s creation date).
Adds unit of time to the specified date. Units can be any of the following: • YEARS • MONTHS • WEEKS • DAYS Eq. <<DATEADD(‘<<TODAY>>’, ‘%PROPERTY_20%’, 7′,’DAYS’)>> add 7 days to property date (difference between current date and document’s creation date).
Example
Property Name
Property ID
Property Value
Data Type
SubmittedDate
42
November 1, 2021
Date
Input: <<DATEADD(%PROPERY_20%’,’7′,’DAYS’)>>
Result: 17.01.2021
5. Filter Lookups Expression
Expression
Description
<<FIRST(‘%PROPERTY_ID%’)>>
Selects first lookup from multiselect lookup property.
<<LAST(‘%PROPERTY_ID%’)>>
Selects last lookup from multiselect lookup property.
Note: For older M-Files versions where %PROPERTY_ID%.%PROPERTY_ID% syntax is not supported, property relations to second, third, etc. level can be achieved like below.
Formats selected multiselect lookup property as text.
Note: For older M-Files versions where %PROPERTY_ID%.%PROPERTY_ID% syntax is not supported, property relations to second, third, etc. level can be achieved like below.
Calculates the value of a given ternary expression (IF-THIS-THAN-THAT operation). Operator can be any of the following: • != • >= • <= • > • < • = Eq: Expression <<‘%PROPERTY_1156%’>=’18’?’true’:’false’>> could be used in order to automatically set IsAdult property from Age property.
Example
Property Name
Property ID
Property Value
Data Type
Priority
1039
High
Choose from list
Project
1038
Project Test
Choose from list
TaskName
1040
Learn Macro
Text
Adult
1050
True/False
Boolean
Age
1156
21
Number (integer)
Request
If property (Project) is empty, then don’t show it
You can combine multiple macro expressions, by following the rules and adding macro instead of property. For example <<DATEDIFF(‘<<NOW>>’,’%PROPERTY_50%’,’DAYS’)>>
After you have successfully installed the application, you can start adding calculation rules in application configuration. Each property that is configured will be converted to auto calculated property. There can only exist one active (enabled) rule per single property. If multiple rules are configured for a single property, validation error message will be shown and only the first configured enabled rule will be used.
Open M-Files Admin
In the left-side tree view, expand the desired connection to M-Files Server.
In the left-side tree view, expand the Document Vaults node.
Still, in the left-side tree view, expand the vault where you installed the connector and select Configurations.
Expand Other Applications
Expand Extension Kit
Click on Extended auto properties
Field Description
Field
Value
Description
Enabled
Yes/No
Specifies whether the module is in use.
Expression parsers > Date part parser
Enabled
Yes/No
Specifies whether the parser is in use.
Expression parsers > Date format parser
Enabled
Yes/No
Specifies whether the parser is in use.
Expression parsers > Date diff parser
Enabled
Yes/No
Specifies whether the parser is in use.
Expression parsers > Date add parser
Enabled
Yes/No
Specifies whether the parser is in use.
Expression parsers > Filter lookups parser
Enabled
Yes/No
Specifies whether the parser is in use.
Expression parsers > Format lookups parser
Enabled
Yes/No
Specifies whether the parser is in use.
Expression parsers > Math parser
Enabled
Yes/No
Specifies whether the parser is in use.
Expression parsers > Ternary operator parser
Enabled
Yes/No
Specifies whether the parser is in use.
Expression parsers > Text transform parser
Enabled
Yes/No
Specifies whether the parser is in use.
Expression parsers > Regex parser
Enabled
Yes/No
Specifies whether the parser is in use.
Expression parsers > Translation parser
Enabled
Yes/No
Specifies whether the parser is in use.
Translation language
Text
Specifies language to translate into.
Expression parsers > Translation parser > Translation service
Optional storage for translations. Currently, only SQL Server database can be used for this purpose. Storing translations fetched from translation service to permanent storage has two advantages: • Caching. No subsequent requests to translation service need to be made for inputs that already exist in storage. • Modification. Stored translations can be modified as appropriate.
Connection string
Text
Connection string to the SQL Server database that will be used to store translations.
Table
Text
Name of database table that will be used to store translations.
Rule groups > Group [n]
Name
Text
Specifies rule group name.
Rule group > Group [n] > Rules [n] > Rule
Name
Text
Specifies rule group name.
Description
Text
Optional rule description.
Enabled
Yes/No
Specifies whether the rule is in use.
Configuration mode
Simple/Advanced
Display simple or advanced configuration options for rule.
Property
Property
Property whose value will be calculated.
Recalculate properties
Yes/No
If it set to yes, it will recalculate chosen properties when clicked Recalculate on dashboard.
Property value
Text
Calculated property value expression.
Recalculate daily
Yes/No
If yes property will be recalculated between midnight and 1 am.
Business critical
Yes/No
If set to true, rule will be logged in SEQ.
Use calendar in Date functions
Yes/No
Exclude non working days only. Works only for <> and <> macros.
Calendar setting source
One of the following: • FromRule • FromEnviroment
From Rule. Rule will use calendar specified on source. FromEnvironment. Rule will use calendar specified in Environment section of Extension Kit.
Calendar alias
Text
Displayed only if From Environment is selected as Calendar setting source. Users must specify calendar alias from environment.
Rule group > Group [n] > Rules [n] > Rule > Calendar enviroment>NonWorkingDay[n]
Occurrence
One of the following: • Weekly • Monthly • Yearly • Once • Holiday
Specifies when the non-working days will be calculated weekly, monthly, yearly, once, or holiday.
Rule group > Group [n] > Rules [n] > Rule > Calendar environment>NonWorkingDay[n]>Weekly>Date
Weekday
One of the following: • Monday • Tuesday • Wednesday • Thursday • Friday • Saturday • Sunday
Specifies which day in the week.
Rule group > Group [n] > Rules [n] > Rule > Calendar environment>NonWorkingDay[n]>Monthly>Date
One of the following: • Static • From Vault
Static. Choose specific date for non working day. From vault. Choose date property for non-working day
Type
One of the following: • Static • From Vault
Static. Choose specific date for non working day. From vault. Choose date property for non-working day.
Type
One of the following: • SpecificDate • Specific Weekday
Day of month
Number
Rule group > Group [n] > Rules [n] > Rule > Calendar environment>NonWorkingDay[n]>Monthly
Week of month
One of the following: • First • Second • Third • Fourth • Fifth • Last
Which week of the month is used.
Day of week
One of the following: • Sunday • Monday • Tuesday • Wednesday • Thursday • Friday • Saturday
Which day of the week is used.
Date property
Property definition
Date property on Date object in vault.
Rule group > Group [n] > Rules [n] > Rule > Calendar environment>NonWorkingDay[n]>Yearly
Type
One of the following: • Static • From vault
Static. Choose specific date for non working day. From vault. Choose date property for non-working day.
Month
One of the following: January, February, March, April, May, June, July, August, September, October, November, December
Day of the week
One of the following: • Sunday • Monday • Tuesday • Wednesday • Thursday • Friday • Saturday
Search condition
Search condition
Search condition to use for finding date property on Date object in vault.
Date property
Property definition
Date property on Date object in vault.
Rule group > Group [n] > Rules [n] > Rule > Calendar environment>NonWorkingDay[n]>Once
Type
One of the following: • Static • FromVault
Date
Date
Search condition
Search condition
Search condition to use for finding date property on Date object in vault.
Date property
Property definition
Date property on Date object in vault.
Rule group > Group [n] > Rules [n] > Rule > Calendar environment>NonWorkingDay[n]>Holiday>Date[n]
Country
One of the following: • GB • HR • SI • PL
Select country for national holidays.
Use all holidays
Yes/No
Use all national holidays as non-working days or not.
Rule group > Group [n] > Rules [n] > Rule > Calendar environment>NonWorkingDay[n]>Holiday>Date[n]>Use holidays [n]
Holiday[n]
List of holidays.
List of holiday specific for country which user choose in Country section.
Rule group > Group [n] > Rules [n] > Rule > Filter conditions
SearchConditions
Search Conditions
Displayed only if [Advanced] is selected as a Configuration Mode. Optional additional conditions that object needs to satisfy. Conditions inside a single filter are combined with AND, while multiple filters are combined with OR operator.
Rule group > Group [n] > Rules [n] > Rule > Filter conditions
StopConditions
Stop Conditions
Displayed only if [Advanced] is selected as a Configuration Mode. Optional stop condition. When object matches stop conditions, property is no longer calculated. Multiple stop conditions are combined with OR operator.
Rule group > Group [n] > Rules [n] > Rule > Default value
Mode
One of the following: • No action • Static value • Empty value
Displayed only if [Advanced] is selected as a Configuration Mode. Optional default value for property.
Static value
Value
Display only if [Static value] is selected as a Default value mode. Specifies constant expected property value.
Rule group > Group [n] > Rules [n] > Rule > Advanced settings
Expression type
One of the following: • Complex • Simple • None
Property referencing type can be used to further control expression capabilities and expansion. Complex. Expression uses advanced functionality of placeholder editor. Simple. Improve performance when using only top-level properties and ObjID or ObjVer keywords in expression. None. Further improve performance if not using any properties or placeholder in expression
Time to wait (milliseconds)
Integer
Number of milliseconds to wait before executing any rule in background.
Number of retries
Integer
Maximum numbers of times COM errors are retried.
Retry Interval
Integer
Number of milliseconds to wait between retries.
Use Cases
Calculate how many days till contract expire
Customer is using M-Files for contracts and document management. He would like to know how many days until the expiration of the contract (Picture 1). Customer has used “DATEDIFF” macro in Macros.
Picture 1. Contract
In Picture 2, we can see that Property „Expiring (days)“ has been populated.
Picture 2. Contract with Expiring (days) populated
Configuring Extended auto properties
Picture 3. Configuration – Expiring
Track working days and non-working days when employee takes vacation
Customer wants to track all working days in vacation period of employees.
We created Object type = Vacation in our M-Files Vault and added class Vacation Application. We used it for logging the days someone is out of office for more than one day.
Also we created a property Working days in which we want to calculate working days between start and end day of vacation. In addition, you can add what days are non-working, for precise calculation.
Picture 4. Configure calculation of working days
Also, you can define that the system stops calculating holidays as working days, or simply choose the holiday that you don’t want to calculate.
Use simple or advanced ways of numbering objects and documents by custom values or grouping. Label your document versions using major-minor or custom schema. Auto numbering can be grouped by objects (e.g. Employee, Country, Division, Project) or custom numbering (e.g. A001, 1.0.9, etc.)
Configuration
After you have successfully installed the application, you should configure Extended auto numbering properties.
Open M-Files Admin
In the left-side tree view, expand the desired connection to M-Files Server.
In the left-side tree view, expand the Document Vaults node.
Still, in the left-side tree view, expand the vault where you installed the connector and select Configurations.
Expand Other Applications
Expand Extension Kit
Click on Extended auto numbering properties
Field Description
Field
Value
Description
Enabled
Yes/No
Specifies whether the module is in use.
Configuration mode
Simple/Advanced
Display simple or advanced configuration options for rule.
Rule groups [n] > Group [n]
Name
Text
Specified rule group name.
Rule groups [n] > Group [n] > Rules [n] > Rule [n]
Name
Text
Specifies name of the rule.
Description
Text
Specifies rule description.
Enabled
Yes/No
Specifies whether the module is in use.
Configuration mode
Simple/Advanced
Display simple or advanced configuration options for module.
Business critical
Yes/No
If set to true, rule will be logged in SEQ.
Rule groups [n] > Group [n] > Rules [n] > Rule [n] > Filter condition
Search Conditions
Search Condition
Optional additional conditions that source object needs to satisfy. Conditions inside a single filter are combined with AND, while multiple filters are combined with OR operator.
Rule groups [n] > Group [n] > Rules [n] > Rule [n] > Stop conditions > Stop Condition [n]
Search Condition
Search Condition
Optional search conditions. When object matches stop conditions, property value will not be calculated.
Rule groups [n] > Group [n] > Rules [n] > Rule [n] > Numbering value
Numbering type
• Simple • Semantic
Simple. Plain old integer numbering. Semantic. Consist of three parts, written in the form of x, y, z where x, y and z are integers representing major, minor and patch version numbers respectively.
Property
Property Definition
Property whose value will be set.
Recalculate properties
Yes/No
If it set to yes, it will recalculate chosen properties when clicked Recalculate on dashboard.
Rule groups [n] > Group [n] > Rules [n] > Rule [n] > Numbering value > Property value
Start numbering from
• DefaultValue • Vault
Default Value. Start numbering from specified static default value. Vault. Search for objects in vault that match specified grouping conditions and contain this numbering property and start numbering from biggest found value of property.
Default value
Integer
Default value to use when version is not set.
Increment value
Integer
Increment that will be used when calculating next value.
Include deleted objects
Yes/No
Displayed only if Start numbering from = Vault. Include deleted objects when searching for max value in vault.
Search timeout (seconds)
Integer
Displayed only if Start numbering from = Vault. Search timeout in seconds. This timeout is applied to search operation that retrieves max value of property from vault.
Always search
Yes/No
Always search objects in vault when calculating value.
Increment number part
MajorMinorPatch
Semantic number part to increment when calculating next value.
Rule groups [n] > Group [n] > Rules [n] > Rule [n] > Properties > Property [n] > Numbering value > Property value > Grouping
Group by
One of the following: • Property • PropertyCondition • StatusField • StatusFieldCondition
Grouping condition for numbering.
Property
Property definition
Displayed only if [Property] is selected as Group by. Property for grouping.
Rule groups [n] > Group [n] > Rules [n] > Rule [n]> Properties > Property [n] > Numbering value > Property value > Grouping > Property condition
Property
Property condition
Property condition for grouping.
Operator
One of the following: • = • =! • < • > • <= • >= • Contains • Does not contain • Starts with • Does not start with
Operator to use for comparing actual and expected property value.
Rule groups [n] > Group [n] > Rules [n] > Rule [n] Properties > Property [n] > Numbering value > Property value > Grouping > Property condition > Value
Mode
One of the following: • Dynamic value • Static value • Empty value • No action
Dynamic value. If this option is selected, value of placeholders in expression will be calculated from source object. Static value. If this option is selected, property value will be expected to match constant value. Empty value. If this option is selected, property value will be expected to be empty. No action. If this option is selected, no action will be performed. This is invalid state.
Dynamic value
Text with placeholders
Displayed only if Dynamic value is selected as Mode. Specifies expected property value using properties from source object.
Rule groups [n] > Group [n] > Rules [n] > Rule [n] Properties > Property [n] > Numbering value > Property value > Grouping [n] > Status field
Field
IDTypeVersion
Status field.
Rule groups [n] > Group [n] > Rules [n] > Rule [n] Properties > Property [n] > Numbering value > Property value > Grouping [n] > Status field condition
Field
IDTypeVersion
Status field.
Operator
One of the following: • = • =! • < • > • <= • >= • Contains • Does not contain • Starts with • Does not start with
Operator to use for comparing actual and expected property value.
Value
Number
Status field value
Advanced settings
Time to wait (milliseconds)
Integer
Number of milliseconds to wait before executing any rule in background.
Number of retries
Integer
Maximum number of times COM errors are retried.
Retry interval
Integer
Number of milliseconds to wait between retries.
Use Case
Auto number of new employment contract annexes
Customer is using M-Files for HR processes. When an employee change is planned (e.g. new position, raise, etc.), new annex is created. Customer is numbering new annexes per Employee and per Company (as they have several subsidiary companies). Each employee has his annexes enumerated in order, e.g. 1, 2, 3 etc.
Configuration of auto numbering of new employment contract annexes
Document type is Contract and Property whose value will be set is Contract ID.
Picture 1. Configuration of Auto Numbering properties
Next, we need to define which value we want to set. In those cases that is Customer ID.
Picture 2. Configuring Property value
We want to add auto numbering for Employment Contract, so we set up Property Contract Category to Employment.
Picture 3. Configuring grouping level
When new Contract is created, Contract ID will be automatically defined.
Auto numbering new contract versions in custom way
Customer is using M-Files for different types of contract. Each type of contract has its own way of version numbering, e.g. A001, 1.0.0, 1.0. By using Extended Auto Numbering Properties, all different types of contract have their version set.