This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I filter out template files in views?

Former Member
Former Member
I have some template files I want to hide from the views but I can't figure out how to do this. There are four possible operators when I define the filter in the views. I have tried all the different combinations but none of them are filtering out the templates. When I tried with these three files:

File 1: "Is template" is "Yes"
File 2: "Is template" is "No"
File 3: "Is template" is not a property of the document

this was the result:

Is template = Yes: 1
Is template = No: 2
Is template != Yes: 2
Is template != No: 1
Is template is empty: (none)
Is template is not empty: 1 and 2

None of these views displayed the File 3.

Is there another way to hide the template files which I have not thought of?
  • Unfortunately, searching for documents that are not templates cannot be performed perfectly. This is because each Boolean property can relate to a document in one of these four ways:

    1) property is not specified i.e. it is totally missing
    2) property is specified but its value is empty
    3) property is specified and its value is Yes
    4) property is specified and its value is No

    Not being a template is specified using condition "not specified" or "specified but empty" or "specified and value is No".

    Regarding this need M-Files should be improved at least in two ways, denoted by #1 and #2 below.

    #1: M-Files should provide a way to search for documents that have the property as empty or don't have the property. For example, a new search operator such as "is empty or missing" could be added for this. Alternatively, empty and missing could be combined to mean the same equal thing that the property is missing. When compared to the current case with Boolean properties a reduction from four alternatives to three is noticed. I think this is the perferred choice for simplicity. Does anybody need to separate empty and missing or have you even thought about this?

    #2: M-Files should provide a data type such as Flag that is either missing or present with value Yes. When compared to the current case with Boolean properties a reduction from four alternatives to two is noticed. With this data type, template documents and non-template documents can be specified more naturally, and searching both of these cases is easy.

    Any comments and suggestions are welcome.
  • I agree with the need to address this. It applies to more scenarios than just excluding templates, but in all cases where the filter is used but the property does not exist on certain records. We have not found a good work around for this as yet.

  • Former Member
    Former Member
    Hi,
    I just find a topic with my question, is there a way now to create a view to mask templates?

    Jérôme
  • Former Member
    Former Member
    We can't filter template for now?
  • Former Member
    Former Member
    We have the same problem, you can only filter the template on it's name and take it out of the view that way. Hopefully this is fixed in the next release.
  • Former Member
    Former Member
    I can't see this problem have been solved yet. Will this be fixed in M-Files 11?
  • I added your positive votes to this improvement suggestion (ID 61714). We have not scheduled the implementation of this improvement, so I cannot say whether it makes to the next version.

    Mika
  • Former Member
    Former Member
    I want to do the opposite of this and create a view that shows only templates. I tried to create a view that would show documents where the property "is template" is yes, but "is template" is not available to select on the list of properties. How do I get it listed? I'm logged in as an administrator.
  • Hi bcrocco

    If you scroll to the end of the properties list, you'll find an option to display more. Click on this, and you'll be able to find Is Template
  • Former Member
    Former Member
    Ah that worked, thank you!