The approach shown below is only compatible with version 2.0 of the Vault Application Framework, where the target audience runs M-Files 2018 or higher. If using version 1.0, or to maintain compatibility with M-Files 2015.3 and lower, configuration attributes should be used instead.
In some situations, using nested configuration objects may be needed to express complex configuration structures. One such example would be where an application requires the user to configure a collection of rules, similarly to the Metadata Card Configuration. The sample below defines two configuration classes (Configuration and ConfigurationChild). Members exposed by either configuration class could be simple strings (as below), or any other configuration value for which an editor exists.
Using nested configuration
Customising array element names
In the example screenshot above, adding new items to the Children collection results in items being added named ConfigurationChild, ConfigurationChild, etc. In some situations, it is more useful to show a different value for the item name to make locating the correct item more simple.
This can be done by ensuring that the class in question (ConfigurationChild, below) exposes a Name property:
Alternatively, if the name should be derived from a different property then it can declared using the JsonConfEditor attribute on the class itself. In the case of the example below, the NameProperty property has been explicitly marked as the property to use for the object names.