×
Menu
Index

11.4. M-Files connections and searches

 
All the M-Files features of ChronoScan (export module, import module, searches from scripts, validation against the vault) connect the same way, through the M-Files COM API installed with M-Files Desktop on the machine that runs ChronoScan. Requirements: the M-Files API of the same bitness as ChronoScan (32 or 64 bit), version 18.10 (M-Files 2018) or later, an ADVANCED or Enterprise license and an M-Files account with the rights the job needs in the vault.
Saved connections (Administration tab, M-Files, M-Files Connections)
A saved connection has a name, the server (host), the protocol and port (TCP/IP 2266, HTTPS 4466, gRPC 443 for M-Files Cloud or the gRPC port of the server, local RPC on the same machine) and the credentials type:
Test connection answers "Connection OK" or the reason given by M-Files: a network message points to host, port or protocol; a login message points to the account. The connections are stored in the MFilesConn folder of the configuration with a backup of every save. An export module can either name a saved connection or carry its own; prefer saved connections: one place to change, Entra ID support and they are what the script function ChronoApp.GetMFilesServerApplication uses.
Saved searches (Administration tab, M-Files, M-Files Searches)
A saved search is a reusable query on a vault: the connection, the vault name, the object type and class, whether checked out objects and objects without files are skipped, a file name pattern, the maximum number of results, the timeout, and a list of property conditions (equal, not equal, greater, lower, contains, is empty, is not empty, any value) that must all hold. Deleted objects are always excluded; there is no full text search.
Searches feed the M-Files import module (the objects found become documents of a batch, with their properties as fields) and the script function ChronoApp.MFilesGetSearchResults. When a search runs from a script the ChronoScan variables in the conditions are resolved against the current document (for example %docfield.Tax ID%), which is how a field is validated against the vault: a saved search with a variable plus a few lines in the field script.
The export to M-Files (object type, class, property mapping, line item tables, updating existing objects) is described in M-Files Destination Export Module and in the M-Files Integration Articles.