How can the document be marked if the document entered verification?
There is no built-in way to do that, but it can be done using the script stage after the Verification stage that will check the stage the document was transferred from:
- Create a new checkmark field in the document definition that will contain the value that will depend on the fact that the document entered the Verification stage.
- If needed set the read-only property so that the Verification operator wouldn't try to change the value manually on the Verification. The value will be changed by the script anyway, but the "read-only" property may be set to avoid confusion.
- Create a script stage of the "Document Processing" type in the workflow.
- Put the following script that checks if the document has "Verification" as a value for the previous stage and sets the checkmark value accordingly.
//C# codeIf entry conditions for the Verification stage were not met and the Verification stage was skipped, the Document.PreviousStageInfo.StageName property returns an empty string.
var stage = Document.PreviousStageInfo.StageName;
Document.Field("test\\EnteredVerification").Text = (stage == "Verification") ? "Yes" : "No";
Please note how we refer to the document definition and its field name when trying to change its value.
- This script stage will need to be moved right under the Verification stage.