Unitfly Customer Portal

Validation

Achieve advanced validation of properties while creating or updating your M-Files objects. You could be able to validate property from the original object together with some properties on the referenced objects.

Configuration

After you have successfully installed the application, you can start adding calculation rules.

  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 Extended Validation

Field Description

FieldValueDescription
EnabledYes/NoSpecifies whether the module is in use.
Configuration modeSimple/AdvancedSpecifies basic or advanced options for the module.
Error messageTextDisplayed only if [Advanced] is selected as configuration mode. Error message to display when any condition for the object is unsatisfied.
Rule groups [n] > Group [n]
NameTextSpecifies rule group name.
Rule groups [n] > Group [n] > Rule [n]
NameTextCustom rule name
DescriptionTextOptional rule description.
EnabledYesSpecifies whether the rule is in use.
Configuration modeSimple/AdvancedSpecifies simple or advanced option for the module.
TriggerOne of the following
• Object Created;
• ObjectChanged;
• ObjectEnteredState;
• ObjectChangedState;
• OnComment;
Type of event that triggers the execution of this rule.
ObjectCreated. If this option is selected, the rule will be executed when the source object is created.
ObjectChanged. If this option is selected, the rule will be executed when the source object is changed.
ObjectEnteredState. If this option is selected, the rule will be executed when the source object has entered a new state.
ObjectChangedState. If this option is selected, the rule will be executed when the source object has changed its state.
OnComment. If this option is selected, the rule will be executed when a new comment is written to the source object.
Search timeout (seconds)IntegerDisplayed only if [Advanced] is selected as Configuration mode. Search timeout in seconds. The value should always be between 1 and 90 seconds.
Business criticalYes/NoIf set to true, the rule will be logged in SEQ
Rule groups [n] > Group [n] > Rule [n] > Monitored properties [n]
Property DefinitionProperty DefinitionOptional filter by properties on source object whose change triggers rule execution.
Rule groups [n] > Group [n] > Rule [n] > Trigger source
Object TypeObject typeObject type of source object.
ClassObject classClass of source object.
WorkflowWorkflowWorkflow of source object.
StateWorkflow stateWorkflow state of source object.
Note! If you have entered a state, you must also enter the workflow above.
Rule groups [n] > Group [n] > Rule [n] > Trigger source > Search filters > Filter [n]
Search ConditionsSearch conditionsDisplayed only if [Advanced] is selected as Configuration mode.
Optional additional conditions that the source object needs to satisfy.
Conditions inside a single filter are combined with AND, while multiple filters are combined with OR operator.
Look in One of the following:
• LatestObjVersion;
• AllObjVersion
Specifies whether the source object must match specifies conditions: in the current version, or in any version in history.
Rule groups [n] > Group [n] > Rule [n] > Property validation rules > Property validation rule [n]
NameTextCustom rule name.
DescriptionTextOptional rule description.
EnabledYes/NoSpecifies whether the rule is in use.
Configuration modeSimple/AdvancedDisplayed simple or advanced options for configuration mode.
Value fromOne of the following:
• Source;
• Vault search
Displayed only if [Advanced] is selected as configuration mode.
Specifies where is the location of the property that needs to be validated.
Source. If this option is selected, the property for validation is located on the trigger source object.
VaultSearch. If this option is selected, the property for validation is located in the vault.
Referenced objectProperty definitionsList of property definitions representing reference chain from source object on which property for validation is located.
Custom error messageTextOptional custom error message
Rule groups [n] > Group [n] > Rule [n] > Property validation rules > Property validation rule [n] > Referenced object > Property definition [n]
Property definitionProperty definitionThis indicates the property chain to an object that has properties that need to be validated. That means you can put property from the source object that contains a reference to a different object and properties from that object will be validated. It is possible to reference an object on reference object multiple times and get down on hierarchy as much as you want.
Rule [n] > Property validation rules > Property validation rule [n] > Property validation rule [n] Property condition
PropertyProperty definitionProperty whose value condition needs to be satisfied.
OperatorOne of the following:
• =;
• !=;
• >;
• <;
• >=;
• <=;
• Contains;
• DoesNotContain;
• StartsWith;
• DoesNotStartWith;
• Matches regex
Operator to apply in comparison of actual and expected property value.
Rule groups [n] > Group [n] > Rule [n] > Property validation rules > Property validation rule [n] > Property condition > Value
ModeOne of the following:
• Dynamic value;
• Static value;
• Empty value;
Dynamic value. If this option is selected, the expected value will be read from the source object. Static value. If this option is selected, the expected value will be the specified constant.
Empty value. If this option is selected, the expected value will be empty.
Static valuePlaceholder editorDisplayed only when Mode is Static value.
The expected value of a selected property.
Dynamic valuePlaceholder editorDisplayed only when Mode is Dynamic value.
The expected value of a selected property. Any property placeholders will be expanded to specified property values from source object.
Rule groups [n] > Group [n] > Rule [n] > Vault search > Search [n]
ConditionsProperty definitionAn optional list of conditions that must be satisfied in a vault in order for this rule to be executed.
Search result typeOne 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 the vault.
None. If this option is selected, the vault search will be considered satisfied if no matching objects are found in the vault.
Rule groups [n] > Group [n] > Rule [n] > Vault search > Search [n] > Conditions > Property condition [n]
PropertyProperty definitionSpecifies the property whose value will be checked.
OperatorOne of the following;
• =;
• !=;
• >;
• <;
• >=;
• <=;
• Contains;
• DoesNotContain;
• StartsWith;
• DoesNotStartWith;
Operator to use for comparing actual and expected property value.
ValueProperty valueProperty value to compare actual value against.
Rule groups [n] > Group [n] > Rule [n] > Vault search > Search [n] > Conditions > Property condition [n] < Value
ModeOne of the following:
• Dynamic value;
• Static value;
• Empty value;
• No action;
Dynamic value. If this option is selected, a 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, the comparison value will be empty.
No action. If this option is selected, no action will be performed. This is an invalid state.
Dynamic valuePlaceholder editorDisplayed only if Dynamic value is selected as a mode.
Specifies search comparison value using properties from the source object.
Static valueTextDisplayed only if Static value is selected as a mode.
Specifies constant search comparison value.
Rule groups [n] > Group [n] > Rule [n] > Vault search sort
Sort byPropertyProperty by which results will be sorted.
Sort directionAscending/DescendingThe direction in which results will be sorted.
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

Validate required information on Person when a contract is created

Customer is using M-Files in Human Resources for managing employees, contract, and documents. When they are creating an employment agreement, Person’s personal number is required information (Picture 1). The personal number can’t be a required field on a Person’s object as you don’t send that info before you actually hire that person. You need to validate that contract isn’t created without it and added later on manually.

Picture 1. Simplified structure
Picture 2. Example from M-Files

Configuration of Extended Validation

Source object is Contract, and validation is done on referenced object Person (Picture 3).

Picture 3. Configuration – Source object and Property validation

Referenced object Person is connected via person property on an Employment contract (Picture 4). Property Personal ID is validated that is not empty.

Picture 4. Configuration – Property validation rule

With this validation rule, a contract can’t be check-out if personal ID property is empty. Error will be like on Picture 5. We can add more Extended validation Rules in same Property validation rule. For example, we can also check that Last Name is not empty.

Picture 5. Validation Error message

Player has to be an adult, over 18 to sign-in scholarship agreement

Customer is a football club with a very big youth academy. When young players are signing scholarship agreements if they are not over 18, they need to have a guardian or parent present when they are signing the contract. Parent or guardian is also signing a contract. With extended validation, M-Files will check if there is a guardian not empty when the player is under 18.

Picture 6. Simplified structure

Configuration of Extended Validation

Picture 7. Configuration
Table of Contents