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 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. |
Rules > Rule [n] > Parent object > Search filters > Filter [n] | ||
SearchConditions | Search conditions | 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. |
Rules > Rule [n] > Source object > Search filters > Filter [n] | ||
SearchConditions | Search conditions | 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. |
Rules > Rule [n] > Children Objects > Search filters > Filter [n] | ||
SearchConditions | Search conditions | 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. |
Rules > Rule [n] > Vault search > Search [n] > Conditions > Property condition [n] | ||
Property | Property definition | 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 | Property value to compare actual value against. |
Rules > Rule [n] > Vault search > Search [n] > Conditions > Property condition [n] > Value | ||
Mode | 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. |