F2 Rename function overrides M-Files Configuration rules to prevent changing document names

Hi,

We would like to disable custom names on a specific type of documents, so when a user is creating a document from the template, a pre-determined name is written into "Name or title" and this property is then made Read-Only, so users cannot put in custom names and they have to use properties to describe the document further. However, if you just press F2 (Rename) on the document from the search listing, it overrides these rules and just changes the name and overwrites the "Name or title" property. How can we solve this issue of locking the names?

Thanks,
Žan

Parents Reply Children
  • I put a new property on templates called "Document Name or Title" and this property has the predetermined names in it. I then made a simple metadata card rule saying that original "Name or title" gets the value from this property and then I set it to Read-Only(See screenshots below). This all works, and users cannot change the name directly via the Name or title as it's Read-Only, however they can just press F2 on the document itself and change it there overriding this rule. This is on classic client.

    In the time that I put this question up and now, I actually thought of a solution that it would probably be better to use the Managed Properties module and create a rule there, always forcing that name over so even if the users change the name, it will still get overwritten by the rule. I just hadn't thought this far before, that F2 renaming would work.

  • If you have certain classes always needing certain naming rules then I would use the built-in functionality as described in the user guide: New Class

    What you've done is effectively create a read/write property which the user enters, the value of which is copied to the name or title, and set the name or title to read-only.  Because these are metadata-card-configuration-rules they only apply in the metadata card.  This is why F2 works.  There are a number of cases where metdata-card-configuration-rules are not a perfect approach because the user interacts with the data in other locations; this is just one.