Creating an Object-Based Hierarchy
This example describes a scenario where a construction company wants to use a single hierarchically ordered list of values for three separate properties referring to the location of a construction site. They want the hierarchical value list to be based on actual objects in their vault.
To create the required metadata structure and objects for this kind of scenario, follow the steps provided below. The names of the structure elements are examples only, and you can freely name them as you like.
First, open M-Files Admin and create the required metadata structure elements as instructed below.
-
Create an object type with the names Area (singular) and Areas (plural).
For instructions on creating object types, see Creating a New Object Type.
-
Create four property definitions that have the names listed below. All of them should be of the
data type Choose from list and should show values from the value
list Areas, essentially consisting of various Area objects in your vault.
- Belongs to area
- Construction site continent
- Construction site country
- Construction site city
For instructions on creating property definitions, see Creating a New Property Definition.
Tip: You can optionally set the following filters for the continent and country properties if you want the continent property to only show continents and the country property to hide cities from the list:- Construction site continent: Class = Continent
- Construction site country: Class != City
-
Create the following three classes:
- Continent
- Country
- City
As the value of the Object type setting for each one, select Area.
Under the Properties section, add the Belongs to area property for all the three classes. This way, the property is automatically added to the metadata card when you are creating these objects later on.
For detailed instructions on creating classes, see Creating a New Class.
Next, open M-Files Desktop or M-Files Web and create a hierarchy of continent, country, and city objects.
-
Create a set of continents:
-
Create a set of countries:
- Click the Create button in the top area and select Area.
- To the Class field, enter Country.
- To the Name or title field, enter the name of the country, such as India.
- To the Belongs to area field, enter the name of the continent in which this country is located, such as Asia.
- Click Create once you are done.
- Repeat these steps for as many objects of this class as you require.
-
Create a set of cities:
- Click the Create button in the top area and select Area.
- To the Class field, enter City.
- To the Name or title field, enter the name of the city, such as Mumbai.
- To the Belongs to area field, enter the name of the country in which this city is located, such as India.
- Click Create once you are done.
- Repeat these steps for as many objects of this class as you require.
- Hierarchies
- Construction site continent
- Hierarchy Name = Construction site continent
- Target Property = Construction site continent
- Hierarchy Property = Belongs to area
- Construction site country
- Hierarchy Name = Construction site country
- Target Property = Construction site country
- Hierarchy Property = Belongs to area
- Construction site city
- Hierarchy Name = Construction site city
- Target Property = Construction site city
- Hierarchy Property = Belongs to area
- Construction site continent
- Click Save and close M-Files Admin once you are done.

An example of a hierarchical, object-based value list.