Welcome to Expert Tips — a growing collection of practical, real-world tips to help you get the most out of Extension Kit Core.
This page focuses on the general features of Extension Kit Core, found throughout modules.
Use the table of contents to jump to any tip and find practical guidance, examples, and visuals to support your implementation.
To get a new expert tip delivered to your inbox every week, subscribe to the Tip of the Week newsletter here.
Table Of Contents
Run rules with a Button Click #
The Button Click trigger in Extension Kit Core lets you execute rules directly from the M-Files UI, without waiting for a workflow or property change. Send documents to ERP, run OCR, ZIP files, and more — exactly when you need it.
The trigger works across all trigger-based modules, as well as modules that normally run automatically, such as Extended Auto Properties.
Configuration options
Here’s a closer look at the button action configuration options (Picture 1).

First, you can define if the rule should apply to:
- Selected Objects in Current View
- All Objects in Current View
- Objects Set in Rule
Next, choose where the button appears in the M-Files UI:
- Three dots menu on the document’s action bar
- Right-click menu on a document (or an empty space in a view)
Then, use the Button label field to set custom text displayed on the button.
To guide users, configure messages that appear during execution:
- Confirmation message – displayed in a pop-up before running the rule (Picture 2)

- Success message – displayed when the rule executes successfully (Picture 3)

- Error message – displayed if the rule fails.
Finally, use Order to define where the rule appears in the dropdown list.
Example
Let’s say you have a rule that applies encryption to selected documents with a button click (Picture 4).

In M-Files, open the three dots menu of the document and select the rule (Picture 5). The document is encrypted instantly (Picture 6).


Syncing related properties between object types #
In this week’s tip, we’re tackling a common scenario – asked recently in our community – where related properties need to stay synchronized between two object types to ensure data consistency and save time.
The Challenge
You have an Employee object type with a multi-select property called Customers, containing a list of customers. Meanwhile, your Customer object type has a single-select property Employee, indicating the assigned employee. Since each customer can have only one project leader, but an employee can manage multiple customers, you want changes made in one object type to be automatically reflected in the other.
The Solution
Here’s how to set up synchronization using an orchestrated rule that automatically updates properties between two object types:
- Create an Orchestrated Rule within Property Operations where Customer is the trigger source.
- Rule 1: Search for Employee using an indirect reference and remove self (%.%).

3. Rule 2: Directly search for the same Employee and append self (%.%).

This setup ensures that whenever a customer is added or removed from an employee, the changes are automatically reflected in both the Employee and Customer object types.
Important: Make the Customers property on the Employee object Read-Only to ensure that the Customer object remains your single source of truth.
By automating the synchronization of these properties, you’ll save time, reduce errors, and keep your data consistent across your organization.
Using regular expressions in Extension Kit Core #
Regular expressions (regex) are a powerful way to extract, transform, or validate text — and you can use them in multiple modules in Extension Kit Core to automate and streamline your M-Files processes. In this week’s tip, we’ll show you:
- Examples of what you can do with regex in Extension Kit
- Where regex is supported in Extension Kit
- A practical use case with the Property Operations module
- Best practices for writing and testing regex patterns
Using regex in Extension Kit
With the regex operator, you can manipulate, validate, and extract data across multiple modules in Extension Kit. Regex can be used to split or format property values, create validation rules that ensure specific conditions are met, and extract values based on defined patterns — enabling dynamic property calculations from text input. It also helps identify files that belong to the same object during imports, improving data organization and accuracy. In more complex workflows, regex can play a key role in orchestrating data flows and calculations, supporting automation, and maintaining data integrity throughout your M-Files configuration.
Regex is currently supported in the following modules:
- Orchestrator
- Property Operations
- Email Notifications
- Extended Auto Properties
- Auto Numbering Properties
- Object Operations
- Validation
- SQL Integration
- HTTP Integration
- Excel Reader
- Word Reader
- Versioning
- Reporting
- Data Transfer
Example: Extracting a country code from a phone number
On a Customer object, we have a property storing phone numbers in this format:
+385 91 123 4567
When the object changes, we want to extract just the country code (e.g., +385) and store it in a separate property on the source object. To capture the + and 1–3 digits at the beginning of the string followed by a space, we’ll use this regex pattern:
^\\+?\\d{1,4}
Here’s how to configure this rule in Property Operations (Picture 1):

The result
When a phone number is entered, the rule extracts the country code and saves it to the target property (Picture 2).

Best practices when using Regex
- Use a dedicated site to build, test, and debug your regex patterns. For example, we like to use regex101.com, as it highlights matches and shows capturing groups – which is both useful when setting up Extension Kit rules.
- Start small and test your patterns on real data before deploying.
- Document your regex patterns in the rule descriptions for clarity.
Regex can help you clean and structure data automatically, adding flexibility and precision to your M-Files configuration.
Make rule testing easier with Run Once #
When testing Extension Kit Core rules, it’s common to rely on changing object states, adding comments, or creating objects to trigger rule execution. But doing those steps repeatedly just to check if your rule works can be time-consuming, not to mention a bit frustrating.
That’s where the Run Once feature on the Dashboard comes in.
What is Run Once and how it works
Run Once lets you manually trigger a rule once, executing it on all matching objects in the vault. It’s especially useful during testing and configuration.
Here’s how to use it:
- Set up your rule as usual.
- Set the trigger to Run Once.
- Go to the Dashboard tab.
- Click the Execute RunOnce rules button within the desired module.
All rules with the Run Once trigger in that module will run immediately, without the need to simulate a workflow or perform repetitive actions.
Example use case
Let’s say you’re configuring an email notification and want to make sure everything looks right — clean formatting, no typos, and all the details in place. Instead of repeatedly adding comments or changing states on the same object, you can configure a rule like this (see Picture 1):

To test the rule, go to the Dashboard tab and click Execute RunOnce rules under the E-mail Notifications module (Picture 2). It’s a faster and cleaner way to test your configuration, without cluttering the vault or wasting time.
And if the rule takes a while to execute? You can stop it directly from the same screen using the Stop RunOnce rules button.

Run Once can be a great time-saver when you’re fine-tuning a rule and want to test the output multiple times. Next time you’re testing, use Run Once — it’s a simple feature that can make a big difference.
Advanced use of Vault Search #
In the Property Operations module, the Vault Search feature is typically used to find an object whose property value should be set based on a value from the Trigger Source, or vice versa — to retrieve metadata from a related object and apply it to the Trigger Source.
This tip starts with a quick introduction to Vault Search, then dives into advanced use cases showing how to use Vault Search to filter the Trigger Source based on data from multiple related objects in the vault.
Basic Vault Search functionality
Here’s a classic use case to illustrate how Vault Search works.
A rule in the Property Operations module (Picture 1) uses Vault Search to set the Invoice Owner property based on the Created by property of the Invoice object. Since Created by stores the Login Account of the user who created the object, and Invoice Owner expects an OT Employee, we can’t directly copy the value.
Instead, Vault Search helps by locating the Employee whose Login Account matches the Created by value. That Employee is then assigned to the Invoice Owner property.

Advanced filtering options
In addition to this intuitive usage, Vault Search can also serve as an advanced filtering step that extends your ability to filter objects across the vault. While Trigger Source filtering only allows filtering its own properties, Vault Search lets you define conditions the Trigger Source must satisfy based on information from other related objects in the vault.
In an invoice processing scenario with Vendor and Invoice objects, you might want to evaluate a Vendor based on data from its related Invoices, such as:
- Have they issued an unusually high-value invoice?
- Do they have any unpaid invoices?
- How long has it been since their last invoice?
Vault Search checks related Invoices and determines whether the Vendor meets the specified criteria, executing the rule only when those conditions are met. You can configure it to:
- Execute the rule if at least one related object matches the criteria (Search Result Type = Any), or
- Execute the rule only if no related objects match the criteria (Search Result Type = None).
Important: If the rule is orchestrated, make sure to set the Use vault search option to Yes to retain this behavior.
Example 1: No invoices in the last year (Search Result Type = None)
This rule sets the Activity Status of any Vendor to Inactive if they haven’t had any invoices in the past 12 months. If Vault Search returns no results, the condition is met, and the Activity Status property is updated (Pictures 2 and 3).


Example 2: Vendor has unsettled invoices (Search Result Type = Any)
In this case, the rule identifies each Vendor, finds all related Invoices using Vault Search, and checks if any invoice has the property Settled set to No. If even one such invoice exists, Vault Search returns a result, and the Unsettled Invoices property on the OT Vendor is set to Yes (Pictures 4 and 5).


Vault Search provides a powerful, flexible way to filter objects based on data spread across multiple objects in the vault. Along with the Orchestrator and Validation modules, Search filters, and Dynamic search conditions, Vault Search expands your ability to validate and automate processes on objects across the vault, increasing speed and efficiency in the configuration process.
Advanced scheduling with cron expressions #
Need to run a rule every workday at a specific time, or just on the second Friday of each month?
The Scheduled trigger type in Extension Kit Core lets you define when rules should run. You can set basic frequencies like once, hourly, daily, etc. — but if you need more precision, you can create custom schedules using cron expressions.
What is a cron expression?
A cron expression is a five-part string that represents a schedule for executing tasks at specific times or intervals. Each part represents a unit of time:
- Minute (0-59)
- Hour (0-23)
- Day of Month (1-31)
- Month (1-12)
- Day of Week (0-6, where 0 = Sunday)
For example, a cron expression like 0 12 * * 1 would schedule a task to run at 12:00 PM every Monday.
Using cron in Extension Kit Core
When scheduling with cron, Extension Kit uses this expression as a default value: */5 9-17 * * *
Which means: Every 5 minutes, from 9 AM to 5 PM, Monday through Friday (Picture 1).

Example use cases
Here are a couple of practical cron expression examples:
- Automated invoice syncing: Using the HTTP Integration module, fetch invoices from a service every 20 minutes during working hours:
*/20 9-17 * * * - Biweekly contract archiving: Using the Archiving module, archive contracts every second Friday at 5 PM:
0 17 */14 * 5
Not sure if your expression is correct? Use the cron helper to explore and test cron expressions easily.
If your process needs precise timing, cron expressions give you the flexibility to match your rules to real-world business schedules — down to the minute.
Use filename wildcards to target specific files #
When working with multi-file documents in M-Files, you often need to fetch or process only specific files within a multi-file document. That’s where filename wildcards in Extension Kit Core come in handy. They allow you to specify which documents to include or exclude.
What is a filename wildcard?
A filename wildcard is a special character (or set of characters) used to match filenames or patterns in file systems. It helps you filter and select the right document(s) when an object includes multiple files.
Example: Filtering specific files in a multi-file document
For example, let’s say you have a multi-file Contract document with the following files:
Annex_A.pdfAnnex_B.pdfContract.docxNDA.docx
You want to archive only the NDA documents for all employees using the Archive module. In this case, you would use the filename wildcard NDA, which will pick up all files containing “NDA” in their name, while ignoring Annex and Contract files (Picture 1).

Filename wildcards in EK Core
In Extension Kit Core, you mainly use two wildcard patterns:
- * that matches any number of characters Example:
file*matchesfile,file1,file_test.txt, etc. - File-type specific wildcards, like
*.pdf,*.docx,*.jpg
Example use case: Cleaning up multi-file email documents
Imagine your company receives invoices via email attachments in common formats like PDF, XLS, and DOC. In M-Files, you’ve configured the Connections to External Sources to import these emails with attachments into M-Files.
The resulting M-Files object is a multi-file document that may include:
- An image from the email signature (
.jpg) - The email body (
.html) - The actual invoice attachment in its original format
Since you only need the invoice, you can use the Document Processing module to create a rule that keeps only files matching *.pdf, *.xls, *.doc, and deletes the rest (like .html and .jpg) (Picture 2).

Using filename wildcards helps you easily target exactly the files you need from multi-file objects, keeping your objects clean and focused on the documents that matter.