Unitfly Toolkit for M-Files logo color

Automatically create new objects in M-Files when your defined trigger happens. Define what will be created, what the properties are and under which conditions are object(s) created.

Configuration #

  1. Open M-Files Admin
  2. In the left-side tree view, expand the desired connection to M-Files Server.
  3. In the left-side tree view, expand the Document Vaults node.
  4. Still, in the left-side tree view, expand the vault where you installed the connector and select Configurations.
  5. Expand Other Applications
  6. Expand Extension Kit
  7. Click on Object creation

Field Description #

NameValueDescription
EnabledYes/NoSpecifies whether the module is in use.
Configuration modeSimple/AdvancedDisplay simple or advanced configuration options for module.
Rules > Rule [n]
NameTextCustom rule name.
DescriptionTextOptional rule description.
EnabledYes/NoSpecifies whether the rule is in use.
Configuration modeSimple/AdvancedDisplay simple or advanced options for rule.
TriggerOne 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 the source object is created.
ObjectChanged. If this option is selected, rule will be executed when any change is made to the source object
ObjectEnteredState. If this option is selected, rule will be executed when the source object has entered a new state.
OnComment. If this option is selected, rule will be executed when the source object has new comment.
RunOnce. 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.
Error handling behaviorError handling behaviorDisplayed only if [Advanced] is selected as Configuration mode.
Define how errors are handled. Continue will log errors and continue execution. Suspend transaction will rollback all and show error massage.
Execution modeOne of the following.
• EventHandler
• Background
Displayed only if [Advanced] is selected as Configuration mode.
EventHandler. Rule will be executed in event handler for configured event.
Background. Rule will be executed in background, after the event has occurred.
Search timeout (second)IntegerSearch timeout in seconds.
Business criticalYes/NoIf set to true, rule will be logged in SEQ.
Update metadata in fileYes/NoWhen 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] > Trigger source
Object TypeList of object typesObject type of source object.
ClassList of classesClass of source object.
WorkflowList of workflowsWorkflow of source object.
StateList of workflow statesWorkflow state of source object.
Note! If you have entered a state, you must also enter the workflow above.
Rules > Rule [n] > Trigger source > Search filters > Filter [n]
SearchConditionsSearch conditionsOptional 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] > New objects > New object [n]
TypeOne of the following:
• Manual
• FromTemplate
Type of creation of new object.
Manual. When this option is selected, new object will be created as empty object.
FromTemplate. When this option is selected, new object will be created from template (any existing object can be used as a template). Note that template can be any arbitrary object, it does not need to be marked as template in M-Files in order to be used as object creation template.
Object typeObject typeType of created object.
Object classObject classDisplayed only when rule type is Manual.
Object class of new object that will be created with this rule.
Template typeOne of the following:
• Source
• StaticObject
•ReferenceOnSource
• SearchResult
Displayed only when Type is FromTemplate.
Template propertyProperty definitionDisplayed only when Type is FromTemplate and Template type is ReferenceOnSource.
Property on source object that contains reference on template object.
Properties for removalProperty pickerDisplayed only when Type is FromTemplate.
Properties from the template that will be removed from object when created.
Template objectObject pickerDisplayed only when Type is FromTemplate and Template type is StaticObject.
Object Type and ID of template object.
Rename template filesYes/NoDisplayed only when Type is FromTemplate.
Rename those template files whose name is equal to template’s title to new object’s title.
Rules > Rule [n] > New objects > New object [n] > Template Object
Object TypeObject typeObject type of template.
IDIntegerObject template ID
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n]
PropertyProperty definitionProperty from source object that will be set on new created object.
Value typeOne of the following:
• Value
• Function
Controls how the value of property will be calculated: directly by copying value from source or as function of selected property values.
Value fromOne of the following:
• Source
• VaulSearch
Whether to get property value to use in new property dynamic expression from trigger source or from vault.
MultiSelectLookup BehaviourOne 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.
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] > Function
Functions groupOne of the following:
• Text
• Date
• Numeric
• Regex
Type of function that will be used to calculate property value.
FunctionWhen Functions group is Text, one of the following:
• Concatenate
• ToLower
• ToUpper
• ToLowerInvariant
• ToUpperInvariant

When Functions group is Date, one of the following:
• Add Hours
• AddDays
• AddMonths
• AddYears

When Functions group is Numeric, one of the following:
• Sum
• Subtract
• Multiply
• Divide
• Average
• Percent
Function that will be used to calculate property value.
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] > Function > Parameters
Parameter typeOne of the following:
• Property
• Constant
Type of parameter to use in function.
PropertyProperty definitionDisplayed only when Parameter type is Property.
Property whose value will be used in function.
ConstantConstant valueDisplayed only when Parameter type is Constant.
Constant value that will be used as parameter in function.
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] > Value
ModeOne of the following:
• Dynamic value
• Static value
• Empty value
Dynamic value. If this option is selected, expected value will be read from source object.
Static value. If this option is selected, expected value will be the specified constant.
Empty value. If this option is selected, expected value will be empty.
Static valuePlaceholder editorDisplayed only when Mode is Static value.
Expected value of selected property.
Dynamic valuePlaceholder editorDisplayed only when Mode is Dynamic value. Expected value of selected property. Any property placeholders will be expanded to specified property values from source object.
Rules > Rule [n] > New objects > New object [n] > Add source reference on new object
PropertyProperty definitionProperty on search result object in which reference to new object will be stored.
MultiSelectLookup
Behaviour
One of the following:
• Append
• Overwrite
Append. Reference will be appended to selected multi-select lookup property.
Overwrite. Reference will overwrite any existing value in selected multi-select lookup property.
Rules > Rule [n] > New objects > New object [n] > Add new object reference on source
PropertyProperty definitionProperty on search result object in which reference to new object will be stored.
MultiSelectLookup
Behaviour
One of the following:
• Append
• Overwrite
Append. Reference will be appended to selected multi-select lookup property.
Overwrite. Reference will overwrite any existing value in selected multi-select lookup property.
Rules > Rule [n] > New objects > New object [n] > Add new object reference on search result
PropertyProperty definitionProperty on search result object in which reference to new object will be stored.
MultiSelectLookup
Behaviour
One of the following:
• Append
• Overwrite
Append. Reference will be appended to selected multi-select lookup property.
Overwrite. Reference will overwrite any existing value in selected multi-select lookup property.
Rules > Rule [n] > New objects > New object [n] > Advanced settings
Iterator propertyProperty definitionProperty on source to use as iterator for creating new objects. For example, if Assigned to is used as iterator, new object will be created for each assignee.
Iterator item propertyProperty definitionProperty on new object that will store current iterator item.
Iterator index propertyProperty definitionProperty on new object that will store index of current iterator item. Index numbering starts at 1.
Rules > Rule [n] > Vault search > Search [n]
Search result typeOne of the following:
• Any
• None
Any. When this option is selected and at least one search condition is set, rule will be executed only if the vault search result has at least one matching result.
None. When this option is selected and at least one search condition is set, rule will be executed only if the vault search result doesn’t have any matching results.
Rules > Rule [n] > Vault search sort
Sort byProperty definitionProperty conditions for vault search.
Sort directionOne of the following:
• Ascending
• Descending
Ascending. If this option is selected, search result will have ascending order.
Descending. If this option is selected, search result will have ascending order.
Rules > Rule [n] > Vault search > Search [n] > Conditions > Property Condition [n]
PropertyList of property definitionsProperty whose value condition will be checked.
OperatorOne of the following:
• =
• !=
• >
• < • >=
• <=
• Contains
• DoesNotContain
• StartsWith
• DoesNotStartWith
Operator to apply in comparison of actual and expected property value.
Rules > Rule [n] > Vault Search [n] > Conditions > Property Condition [n] > Value
ModeOne of the following:
• Dynamic value
• Static value
• Empty value
Dynamic value. If this option is selected, expected value will be read from source object. Static value. If this option is selected, expected value will be the specified constant.
Empty value. If this option is selected, expected value will be empty.
Static valuePlaceholder editorDisplayed only when Mode is Static value.
Expected value of selected property.
Dynamic valuePlaceholder editorDisplayed only when Mode is Dynamic value.
Expected value of selected property. Any property placeholders will be expanded to specified property values from source object.
Advanced settings
Time to wait (milliseconds)IntegerNumber of milliseconds to wait before executing any rule in background.
Number of retriesIntegerMaximum number of times COM errors are retried.
Retry interval (milliseconds)IntegerNumber of milliseconds to wait between retries.

Use Cases #

Create Agreements (NDA), Statements, when person is hired #

Customer is large IT company and they are using M-Files HR solution. When their candidate is hired, entered the Active state Picture 1, M-Files automatically creates NDA and Statement.

Picture 1. Employee Workflow

For each document they have defined templates in M-Files, Picture 2.

Picture 2. Templates in M-Files

Employee object is created (Picture 3) and when it goes through workflow. When its entered Active state, two new documents will be created.

Picture 3. Employee object in M-Files

Configuration of Object creation #

Source object that trigger creation of NDA and Statement is Employee. Both objects will be created from templates and required properties is Employee, Picture 4.

Picture 4. Structure of NDA and Statement

Documents Names are automatically calculated of Class and Employee, so we will need to add set Employee property.

object creation configuration for source object
Picture 5. Configuration – Source object
object creation configuration for new object
Picture 6. Configuration – New Object

On a statement, we would like to add Current position, so configuration is like on Picture 7.

object creation configuration for source object
Picture 7. Configuration – Statement

Now when Employee is in active state, two documents are created, Picture 8.

Picture 8. Employee with two new documents

Create Tasks when a project is created #

Customer is using M-Files for Project Management. When Project is created, few specific tasks are created to project manager.

Picture 9. Configuration – Project and Tasks

Creating copy of object and properties in new class and making copies of attachments and editing references on both ends. #

Source object that triggers the creation of Financial report is Incoming mail, which Text property has value “Financial report”. New object will be created from template (source object), Picture 10.

Picture 10. Configuration – Create Financial report from Incoming mail.

After the new Financial report is created, copies of attachments are created and references are edited on Financial report and on attachments, as seen in the Picture 11.

Picture 11. Creating copies of Attachments and editing references.

Your one-stop hub for Unitfly Toolkit for M-Files!

Unitfly Toolkit Community is live!

News and updates on our products • Frequently asked questions • Support page