Configuring the Failed - Do Not Try Again Button

You can write an action script that controls the functionality of the Failed - Do Not Try Again custom button.

Procedure

  1. Open the Interview Witness form in the Form Designer if it is not already open.
  2. Click the Failed - Do Not Try Again button and view its Properties view.
  3. Click the Rules tab on the Properties view.
  4. Click the Add Rule button against the event type Select (select).
  5. Add following inputs in the Rule Details page and click Next:
    • Name:
      failed_dont_try_again
    • Label:
      Submit with witness status = "FAILED"
  6. Leave the Select(select) event type unchanged in the Choose Events page and click Next.
  7. Click the (plus) button in the Define Actions page.

    The Add Action to Rule page opens.

  8. Select options Create a new action and Script Action, and click Next.
  9. Type the following values in the input fields:
    • Name:
      failed_dont_try_again
    • Label:
      Submit with witness status = "FAILED"
  10. Type this Script:
       this.getForm().getControl("witstatus").setValue("FAILED");
       this.getForm().invokeAction("submit",this);
  11. Click Finish twice.