Undelete a View

I do not see an option to undelete a View, but I'll ask anyway in case I'm just not looking at the right place.

I created a common View for my department and it took sometime to create because I had to customize many of the virtual folders.  Now, I'm concerned that someone might accidentally delete this common view.  

Is there an undelete function for a view for the admins?

For now I duplicated the view and have a copy under 'My Views.'

  • The personal duplicate is a good workaround :-)

    I have never seen options to "undelete" a view, but I have only needed it once in my almost 10 years working with M-Files, and that was because of my own doing.

    Only Admins can delete common views, so if you keep the number of Admins to an absolute minimum and give those people proper training, then the risk of accidental deletion is also minimal.

  • well said. I echo this too. 

    At one point, we had about 40 'super users' we gave access to create Common Views, but inevitably, someone started deleting someone else's common views. 

    So instead, only IT M-Files admins (2 admins) can create Common Views. This has significantly benefited us because it has standardized a look and feel of Common Views, they're reliable, and there's very little risk of accidently deleting a common View that the organization has come to rely on. 

    I also like the idea of a 'back-up' Common View tucked away as a My View - I'm going to have to borrow that! :) 

  • There is a way to undelete a view.

    1. Do a one-time export, selecting in Structure tab the Export structure checkbox and the the Views checkbox. Seems that you need to export all the views to have the deleted view included in the package.
    2. In the resulting replication package, open Metadata\Structure.xml in a text editor and search for the view by its name or ID. Once you have located it, change deleted="true" to deleted="false" and also increase the changedat timestamp by e.g. 1 second. This is needed for the import to realize the package contains a more recent version.
    3. Once you have saved the Structure.xml, import the package with the one-time import.

  • That's really handy to know! Is this in the M-Files manual? Or did you have to learn this the hard way?

  • I don't think it is in the manual, just a trick to know.