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

Moving into new state using a dialog box

Former Member
Former Member

Hi everyone,

I would like to use a dialog box to prompt user to move the object into a new state after the user have clicked the ?Create? or ?Save? button on the meta data card.

The dialog box should have the following question:
?Would you like to move this object into the next state??
The user can then click ?Yes? or ?No?.

Would this be possible to do with a VBS script?

  • There are probably a few good ways to achieve what you are trying to do without having to show a new dialog box like metadata configuration rules etc. One option is that you just add a mandatory property on the document asking the same question and then you just use automatic state transitions in workflows.

    What exactly is the use case?

    Mika
  • Hi all, i got the same question like toco, is there (now) a way to handle a dialogresult in a vbscript or VAF-Application? Or is it possible to force a mandatory comment  only for specific states? I know how to check the "comment" property via a precondition, but thats not very pretty. 
    Thanks for any help.

    Best regards
    Stefan

  • Former Member
    0 Former Member in reply to stefanB

    Hi . Just a quick note here that we are working on a reply to this question! is looking into it and will post back here, soon. Didn't want you to think you'd been forgotten. More to come soon...

  • There isn't a way to present and handle a dialogue result. So the method Mika suggested previously is likely your best workaround. You can setup your properties, requirements, and configuration rules in such a way that will mimic this same behavior. Such as not letting users check in an object in a workflow state without filling in a required property, and then automatically transitioning between workflow states depending on what those properties are set to.

  • Hi Toco,

    Hope I understood it correctly. You could implement Vault UI app for such things. I think this could be even what you want: https://github.com/M-Files/MFilesSamplesAndLibraries/blob/master/Samples/UIX%20Applications/ConfirmWorkflowStateChange/vaultui.js.

    We use similar approach for validation where properties are generally non-mandatory but in case user tries to move the document into the next workflow state, the error is raised in case not at least one document is provided. You can use Event_SetPropertiesOfObjectVersion event for that.

    The good thing is that you do not show error details which is kind of annoying if you use server-side actions (pre-condition check). Nevertheless, in case of validation be aware that you always need to have the same validation on a server side as Vault UI app is just a script located on the user machine and if user finds it, he/she can very easily disable it. 

    Dejan