We went through installation and basic config of M-Files, and in the end we created our first document vault (Vault101). Now, we will finally dig into created Vault and try to understand Metadata in M-Files. In M-Files everything is about Metadata, so you need to understand how Metadata in M-Files works, in order to successfully use this app.
Workflow and Metadata structure can be a little scary if you don’t have experience with this kind of information. I will leave useful link here and screenshot of metadata structure. You will need this data to configure your workflow. Some of the metadata is predefined in M-Files, and some will we create. Metadata in M-Files consists of Object Types, Class Groups, classes, properties and value lists.
This is a place from which I “stole” the picture, and from which you can learn more about the topic of Metadata structure https://www.m-files.com/user-guide/latest/eng/Metadata.html
Same info can be found in the Vault we created under Metadata Structure (Hierarhical View). We can also view same data in Flat View and edit/add data under Metadata Structure (Flat View).
Since I’m more practical guy, and i best understand something by doing it, we will apply principle here and create whole structure from first picture above in our Metadata Structure article (Flat View and Hierarchical combined – since some parts are in one, and others in another view).
Then after we recreate complete picture from above, we will go through the the whole process of document/metadata creation from client side – this way we will understand what fits where in everyday life.
1. Create New Object Type
Ok, since object type is at the top of the hierarchy, we will create two new object type – Customer and Projects (Document is already built in). Projects is at the bottom of the picture, but we will create it now.
Open M-Files Admin – select your server – select Document Vaults – select your Vault (mine is Vault 101) – select Metadata Structure (Flat View) and finally select – Object Types
We will enter Customer for singular name, and Customers for plural name. Beside that under “The types of objects that users can browse…” I will select Document, Document collection and Assignment. OK
After we clicked ok, another pop-up will appear – some properties were automatically created – that is ok.
Now under Object types – we have Costumer and Document
2. Create New Class Groups
Ok, according to our first picture, for Documents object we need to create two Class Groups – one named “Project Documentation” and another one “Purchasing and sales”
Open M-Files Admin – select your server – select Document Vaults – select your Vault (mine is Vault 101) – select Metadata Structure (Hierarchical View) select Document, right click on it and select “New Class Group…”
We will create “Project Documentation” with default settings, and then “Purchasing and sales” the same way.
3. Create New Classes
Now, down our picture, we will create some classes.
Under Project Documentation Class Group we will create “Project Plan” and “Report” class. Under Purchasing and sales we will create “Proposal” and “Order” and under Customer Object we won’t create “Customer” class, because it is created by default after we created Customer Object.
Open M-Files Admin – select your server – select Document Vaults – select your Vault (mine is Vault 101) – select Metadata Structure (Hierarchical View) select Document and expand it – select Project Documentation – right click on it and select Add Class…
Since class we need is not listed, we will create a new one – New Class…
I will just name it Project plan and leave everything else as is. Ok
Now Project plan appeared on our list. – Add
Repeat process for other classes we need to create.
This should be result when we are done.
4. Create Properties
Ok, now onto the properties.
For Order Class we need following properties – Name or title, Document date, Project, Keywords, Customer
For Report Class we need to create following properties – Name or title, Report type, Document date, Description, Project
For Customer Class we need following properties – Customer name, Address, City, State, Country
Open M-Files Admin – select your server – select Document Vaults – select your Vault (mine is Vault 101) – select Metadata Structure (Hierarchical View) select Document and expand it – select Purchasing and sales and expand it – select Order, right click on it and select Add Property Definition…
Name or title is not on the list, so we need to create it – click on New Property…
In the Name field I entered “Name or title” data type is Text and Content is Text – I left everything else as is. Ok
Now “Name or title” appeared on our properties list, select it and click add.
Repeat steps for all other properties. All the properties in our example can be textual. Document date is exception – you can select Date as data type for it.
This is the result, our hierarchy is advancing nicely!
5. Creating Value Lists
We are almost at the bottom of our picture. We need two value lists.
For Customer property under Order Class we need to create Customers Value list
For Country property, we need to create Countries Value list under Customer class.
Ok, let’s go with Countries example first.
Open M-Files Admin – select your server – select Document Vaults – select your Vault (mine is Vault 101) – select Metadata Structure (Flat View) and finally select – Value Lists – New Value List…
I only entered names and left everything by default – Apply – OK
Allow users to add new values to this list – if we want users to add values to list, this option is the one to consider. If a list has a need for new values, and changes a lot, then this is great option for users.
Pop-up will appear, OK
Here is our value list filled
But we are not done yet, we need to connect our Value List with our class/property.
We will connect our Country Property, which is under Customer Class, with Countries value
We created our Country Property as text data type. That is wrong if we wish to use value lists.
Data type should be – Choose from list (multi-select) and from “Show values from the following list” you should select Countries. Apply – OK
Customer property in my case has already defined Customers value list. Ok, so we learned a bit more by exercising with the example above.
6. Value list values
Ok, last item from our picture – value list values.
We have following values for our Customers value list – OMCC Corporation, City of Chicago (Planning and Development) and Davis & Cobb. Attorneys at Law
Next one is tricky – for Projects Object (not value list) we have following – IT Training, Austin District Redevelopment and CRM Application Development
And at last, for Countries value list, we have following values – France, USA, Germany
I will show here two from this list – Countries value list values, and Project Objects value list values – because it is interesting to see how you can add values directly to Objects without going through classes and properties.
Open M-Files Admin – select your server – select Document Vaults – select your Vault (mine is Vault 101) – select Metadata Structure (Flat View), Value Lists – then mark Countries Value list and from the menu on the left select Contents…
Click on New Item
This is how your list should look like
Now, lets do Projects Object
Open M-Files Admin – select your server – select Document Vaults – select your Vault (mine is Vault 101) – select Metadata Structure (Flat View) – Object Types – select Project and click on it – select Delete
Now, go back to Value lists and Create New Value list named Project
After you created the list, select it and and Contents to it (for Project Object)
Now, after you are done with contents – select “Convert to Object Type”
Confirm – Yes
Our Value List is converted to Project Object!! Right click on it, select Properties and from General tab select Contents… button on the bottom of General tab
There you go, we have our values on the list!!
So, what we learned? We created Project object at the beginning – but to that object we are not able to add Value list contents. We need to create Value list, add content to it, and then convert it to object, to have what we need
Ok, if you managed to follow along, congratulations, we are done. Lets now see what this all means and how it translates to real life.
Testing on Client
Ok, finally, let’s see how objects, classes, properties and value lists transfer to real case scenario.
Let’s say we want to create new order for our customer OMCC Corporation. Order name/number is OMCC004, we need to create it with todays date, it is for “Server Upgrade Project” we got a deal with OMCC.
Open M-Files app on Client PC
From the plus sign we will select Document – so we just selected Object – Document object
Now, Document Object is opened and it is offering to us Class Groups, we will select Order Class from Purchasing and sales Class Group
Now, after we confirmed with Next, our class is selected – Order. On next screen we can see Properties for the Order Class
I will now enter Name or Title, Document Date, Project name, Keywords… These are all properties we defined for Order Class.
Here it is all filled up.
Now, to the last Property – Customer. Customer property has defined value list values.
After we clicked on Customer, we got drop down menu with Customer list – we will select OMCC Corporation
After we selected Customer we will click on create
Result is our first created Metadata order in the system!!!
I hope we can now better understand logic of the M-Files Metadata structure through this simple example. Be sure to try it yourself, learning through practice is the best way to learn.
We now have solid ground to play with workflows. Logic we went through above can be defined for all your documents and processes inside company.
My series of articles about M-Files