New Property Definition
In a new property definition, you need to specify the data type after assigning a name to the property. For example, if you are creating a property with the name Document Date, the logical data type choice is Date.
Video: M-Files Administrator: Learn How to Create New Property Definitions and Value Lists
Property definition data types
Text |
Any typed text, for instance, a heading. This type of property accepts a maximum of 100 characters entered via the user interface. More characters can be entered via the M-Files API but values of over 100 characters will be cut and the full value is lost. |
Text (multi-line) |
Any typed text. The text can have multiple lines. This type of property accepts a maximum of 10,000 characters entered via the user interface. More characters can be entered via the M-Files API, but this may cause the value to not be shown in its entirety, as well as other unwanted behavior in the user interface. For instance, attempting to insert property values containing more than 10,000 characters into a Microsoft Office document causes an error. |
Choose from list |
You can select one value from the options on the value list. |
Choose from list (multi-select) |
You can select several values from the options on the value list. |
Date |
You can select a date. As a default, M-Files suggests the current date. |
Time |
You can select a time. |
Timestamp |
This data type can be used for generating a timestamp with a script. Note: The timestamp needs to be
defined as a calculated value. Go to the Automatic
Values tab of the Property
Definition Properties dialog and select the
Calculated value (VBScript) option
and click Edit Code... to add the
VBScript code for generating the timestamp. |
Number (integer) |
You can enter the desired integer. The value can be anything between -2,147,483,648 and 2,147,483,647. |
Number (real) |
You can enter the desired real number. The value can be anything between -1,79 x
10308 and 1,79 x
10308. You can enter the value in
the format XEY, where X is the number to be multiplied,
E represents the base number 10
and Y is the exponent. For instance,
entering -12E3 would result in the
value -12,000.
Note: This data type
can present a wider range of numbers than
Number (integer) but at the
cost of precision. Consequently, Number
(real) should not be used when the number
value has to be absolutely accurate, such as with values
representing money. In those cases, it is recommended to
use Number (integer) as the data
type. |
Boolean (yes/no) |
You can specify the Boolean value yes or no for the desired variable. |
The data type indicates the type of the property. For example, if you create a new property named Confidential and specify Boolean (yes/no) as its data type, you need to select yes or no when filling in the Confidential field on the metadata card. This happens only if the property Confidential has been associated with the document class (Report, Memo, Agenda, etc.) to which the document you are creating belongs.
After creating this property, you can create a new view that lists the documents on the basis of whether they are confidential or not. You can group the documents into the Yes and No property folders by using the view hierarchy.
Value lists can be efficiently utilized in property definitions. For example, the Customers value list is utilized in several property definitions in the M-Files sample vault.
When specifying, for example, the Author Organization, the options are retrieved from the Customers value list, to which you can easily add new values (customers). This way, the same company names need not be entered again, but the existing list can be utilized instead. The lists decrease the number of input errors and make work more efficient.
Pre-filtering of properties
You can specify pre-filtering for property definitions to show a subset of the objects. This way, the list of objects to be displayed can be limited by certain criteria, and the user can more quickly find the desired object when, for example, adding a customer to the metadata card.
For example, pre-filtering can be used to divide:
- Customers into prospective and actual customers.
- Customers into buyers and suppliers.
- Customers into persons and companies.
- Projects into internal and external projects.
- Projects into current and past projects.
The customer class may also be used as a pre-filter for customer listing. Likewise, the project class, for example, may be used as a pre-filter for a project listing.
Filter the list by using the value of the following property
A property definition using a value list that is filtered by some other value list can be defined to be filtered by some other property definition that uses the main value list of the filtered one. This is a case of dynamic filtering, which depends on what the user selects in the metadata card.
Example: The properties Customer (Buyer) and Customer's Contact Person are filled in the metadata card. Selecting the correct Customer (Buyer) also filters values available in the Customer's Contact Person value list to show only contact persons of this selected customer. The Customer (Buyer) property may use the Customers value list and Customer's Contact Person may use the Contact Persons value list. The Contact Persons value list is filtered by customer.
In addition, the Customer (Buyer) property is defined to be filtered by the Buyer property. For more information about hierarchical relationships between value lists and object types, refer to Value Lists and Object Types.
Also, you can select an automatic filter allowing M-Files to search for the best metadata card filter selection to filter the property in question. In this case, for example, the two-way filtering of value lists between ZIP codes and cities functions in a user-friendly manner: In the metadata card, you can choose a ZIP code first, and M-Files then chooses an appropriate city from the list automatically. If you choose the city first, M-Files filters the available ZIP codes automatically according to the city.
Sort values in the list in the following order
You can define whether you want the value list used for the property definition to be ascending or descending.
Allow using this property with the following object type
You can also limit the use of this functionality to just one object type.
Enable automatic permissions via this property
For you to be able to use the automatic permissions via a specific property, you should allow this in the property definition's properties. For the Class property definition, the automatic permissions are active by default, so activation is not needed in this case.
When you have added automatic permissions to a value, value list or object type, M-Files will display the property definitions in which the automatic permissions are enabled and those in which they are disabled. Make sure that the automatic permissions are enabled for the desired property definition.
Note that the specified value must be selected for the explicit property definition for which you have enabled automatic permissions.
Allow this property to be used as a grouping level in views
Enable this option to allow the property to be used for defining a grouping level within a view. It is advisable to disable this option for properties that may contain classified information.
Allow searching for objects by this property
If you disable this option, searches based on the values of the selected property do not generate any results. However, the property can still be shown in the list of additional property conditions. If you enable this option and use the Do not search for old object versions suboption, users can only search for the latest versions of objects on the basis of the values of this property.
If you think the property is a relevant search criterion, this option should be enabled. Otherwise, it is best to leave it disabled to allow the search to perform optimally.
Aliases (Advanced tab)
Via the Advanced tab, you can define an alias for the property definition. For more information, see Associating the Metadata Definitions.
When you have automatic aliases in use and you write a name on the General tab, the Aliases field on the Advanced tab is automatically filled in. The alias has the format <predefined prefix>.<name>. Define automatic aliases for your vault in the configurations editor.