Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback

Last updated on 20 June 2022

Admin
M-Files Admin

Overview

The default "Name or title" property has some limitations. Most notably that the character limit is 100 characters.
Extra care is needed when changing the name property. That is why backups should be taken from the vault before making changes: Backing Up a Document Vault (m-files.com)
 

Solution

Here are the step-by-step instructions how to change the used Name -property of a Class. In this example we will use "Process" as the name of the Class. This guide mostly aims to prepare the new name property to be able to have more than 100 characters. In the end there is also instructions for use case to update the name from one or more other properties.

Changing the "Name or title" to accept more than 100 characters:
Using M-Files Admin:

  1. Go to "Metadata structure (flat view) - Property definitions". Make a copy from the "Name or Title" property (Right-click -> Make copy...). Let's name the copy "Process name" in this guide. Change the data type to "Text (multi-line)".

  2. Choose the "Automatic Values" tab and check the "Simple concatenating of properties". Write %PROPERTY_0% as value to it. This can also be achieved by pressing "Add Placeholder" and choosing "Name or Title" from the list to "Add as ID". Press OK.

Graphical user interface, text, application  Description automatically generated

  1. Change the "Process name" property to use single line format using this support article: Increase Text Box character limit to be over 100 (force.com)

  2. Go to "Metadata structure (flat view) - Classes". Go to "Process" Class properties (Right-click -> properties). Add "Process name" as a property to the Class. Press OK.

Graphical user interface, text, application, email  Description automatically generated

  1. Go to "Metadata structure (flat view) - Property definitions". Choose "Process name" and then from the left "Recalculate…". You can choose to recalculate only empty values when asked as we only have empty values in the newly created property.

Graphical user interface, application  Description automatically generated

  1. At this point it is good to check with M-Files desktop client that the "Process" class objects have the "Process name" as one of its properties and that the value is the same as Name property.

  2. Back to M-Files Admin. Go to "Metadata structure (flat view) - Property definitions". Remove the Automatically calculated value that we set in the step 2. NOTE! Do not recalculate the property value after this.

  3. Go to "Metadata structure (flat view) - Classes". Go to properties of "Process name". Check the "Process name" as required and "Set as name". You can also move the "Process name" as the top property. Then remove the old "Name or title" from the list. NOTE! Do not use the suggested "Update Names…" function as that works in the opposite direction to what we are trying to accomplish.

Graphical user interface, text, application, email  Description automatically generated

  1. Now change the settings of the sources that are using "Process" class to fill the "Process name" instead of the old "Name or title". For example, when bringing "Process" class objects from External database.
     

Changing the "Name or title" to change automatically from the values of other properties:
Other useful feature is to change the "Name or title" to get its value from other properties. This works for most properties, but the built-in "Name or title" can't have automatically calculated values. That is why we need to create a custom name property:

  1. Go to "Metadata structure (flat view) - Property definitions". Make a copy from the "Name or Title" property (Right-click -> Make copy...). Let's name the copy "Calculated name" in this use case.

  2. Choose the "Automatic Values" tab and check the "Simple concatenating of properties". Write the value that you want automatically to be created. To insert values of another properties, specify %PROPERTY_n% where n is the ID of the property definition. This can also be achieved by pressing "Add Placeholder" and choosing the property you want from the list to "Add as ID".


You can use multiple properties and plain text to create the final value:
Insert: %PROPERTY_100% (ID %OBJID%) from %PROPERTY_1001%
Final value example: Quote (ID 5422) from ESTT Corporation

Indirect properties can also be used with syntax %PROPERTY_x.PROPERTY_y%:
Insert: %PROPERTY_100% (ID %OBJID%) / %PROPERTY_1001% (%PROPERTY_1079.PROPERTY_1090%)
Final value example: Quote (ID 5422) / ESTT Corporation (Japan)
 

  1. Follow the steps 4 - 6 and 8 -9 (skip 7.) from the previous section to add this custom name property as the new name property for the class you want.

More: Property Definition Automatic Values (m-files.com)

 

Still need help?