Unable to create a view for documents without workflow

Hello,

I am trying to create a simple view showing all documents without any workflow assigned.

However, I cannot seem to make it work correctly.

What I tried so far:

  • Workflow = empty
    → not possible because M-Files displays the error:
    “The value cannot be empty.”
  • Workflow “not among” all existing workflows
  • State “not among” all existing states
  • Workflow is empty
  • State is empty
  • Using both “Workflow” and “Workflow (all properties)”
  • Using both “State” and “State (all properties)”

None of these returned the expected results.

What is confusing is that:

  • in the column display, Workflow and State show “-”
  • however M-Files does not seem to interpret this as an empty value in filters

I also noticed that some other properties sometimes display completely empty values, while Workflow/State display “-”.

So my questions are:

  1. Is there an official/recommended way to create a view showing objects without workflow?
  2. What is the actual meaning/difference between an empty display and “-” in M-Files columns?
  3. Are Workflow and State treated differently internally from normal properties when filtering views?

Environment:

  • M-Files Desktop
  • Classic view configuration editor

Thank you in advance.

Anne. 

Parents
  • Hi,

    Just following up on this topic.

    I have continued investigating but have not found a solution so far. If anyone has encountered a similar issue or has any suggestions, I would be very interested.

    Thanks!

  • I believe the root cause here is that if no workflow has been assigned, the object doesn't have the Workflow property at all in the database. In M-Files, this behaves like any other property: you can search for properties that exist (even if they have no value), but you cannot search for objects where a property is completely missing. I admit this can be confusing since you can still see the workflow fields on the metadata card.

    Because of this, you won't be able to directly filter or search for objects that don't have a workflow defined.

    As a workaround, you may need to consider a mass-operation where the property is added (even if left empty). Object Manager consulting tool may help with this process. Note that this creates a new version and updates the last modified info on the documents.

    If you need to perform these kinds of checks also in the future, you can consider an event handler that adds an empty Workflow property to the object during creation if no workflow has been defined. That should work at least in theory, but you'll need to test the approach yourself. And naturally you can also enforce a workflow in the class settings.

  • Hi,

    Thank you for the explanation. I understand the mechanism now and why the search cannot find documents where the Workflow property does not exist at all.

    For the existing documents, I will discuss the mass-update approach internally. Thank you for the suggestion.

    For future documents, I have been testing a different approach and would be interested in your opinion.

    I created a Property Calculator rule targeting Document objects with the conditions:

    • Workflow is empty or missing
    • Object version = 1

    When no workflow is defined, the rule sets an empty value for both the Workflow and Workflow State properties.

    After a few tests on document classes both with and without a default workflow, this seems to work as expected. Documents without a workflow receive the empty properties and can then be found through views and searches.

    I added the "Object version = 1" condition to ensure the rule only runs when the object is initially created and does not affect later updates.

    Does this approach make sense from your perspective, or do you see any potential issues or side effects with this configuration?

    Thank you.

  • Sounds like a solid approach. Using the Property Calculator is a great choice to avoid custom scripting/coding.

  • Thank you very much for your feedback and for your help. I'm glad to hear that this approach makes sense. Have a nice day!

Reply Children
No Data