FC Cloud - how to implement event handler (do not close task if field is empty) on Web Verification Station


I am trying to implement an event handler i.e.
 Do not allow user to submit task if field (Name) is empty on Web Verification Station

I tried multiple options :-
a. writing script in (Project Properties > General tab > “Edit Tools” button. Add “On Closing Document)
b. Project Properties>Stage Tools>Verification>Edit>On Closing document

but none of above gave me expected result. Still, task is getting submitted on web Verification Station even if name is empty. (with exceptions)

Script is :- (JScrpt.Net)
if(DocumentEditor.Document.Field("NE PO Def\\Name").Text=="")
{
CanClose.Value=false;
}
else {
CanClose.Value=true;}

In addition to it, extra processing stage is also created o handle rule errors but it is also not restricting user to submit the task with errors.

Did anyone face such issue and come up with solution?

 

Thank in advance

 

------------------

Was this article helpful?

0 out of 0 found this helpful

Comments

2 comments

  • Avatar
    Rahul Kapoor

    I have an alternate solution in mind to achieve what you're trying to do. In your project workflow, put a condition after your Verification stage that 'Only move to Export stage is the required field is not empty'. In case it is empty, move back to the verification stage. That would be easier to implement as well.

    Regards,
    Rahul Kapoor
    www.linkedin.com/in/rahulkapoor309/

    0
  • Avatar
    Samir Waikar

    After creating a new stage after verification stage, what conditions do we need to add?

    0

Please sign in to leave a comment.