The M-Files Community will be updated on Tuesday, April 2, 2024 at 10:00 AM EST / 2:00 PM GMT and the update is expected to last for several hours. The site will be unavailable during this time.

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

Copy Comment property from separate Assignment to main object as precondition

Hi,

I have a workflow with multiple "Approval" states which are going to "Rejected" state which has precondition that "Comment is not empty". One of those approval states has separate assignment on it and it cannot check if separate assignment has comment inserted into it. Basically precondition for Comment check is not working for those separate assignments.

I tried copying the value but i was unsuccessful. Does anybody has solution to this problem? 

Solution would be that M-Files can check both Comment and Workflow Assignment.Comment value and compare them which would probably some sort of VbScript precondition?

  • One option might be to use Managed Properties:

    1) Set up a managed property rule that creates the reference from the main object to the assignment object (based on the reference property on the assignment object).

    2) Set up an auto-calculation rule that copies the comment from the separate assignment to the main object's Comment property, using the reference added by the rule set above. Something like dynamic value Assignment.Comment with filter "Assignment.Comment is not empty" so it doesn't overwrite with an empty value.

    Then your current precondition should work.

  • Hi Joonas, thanks for the help. I will try this but currently we ended up changing the rejected automatic transition to go into different state which only checks the above mentioned precondition for separate assignments. Is there a way to request feature add for OR operator to be added into preconditions and other places in M-Files? That would solve a big chunk of the problems we currently encounter.