Configuring the Failed - Try Again Button

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

Procedure

  1. Open the Interview Witness form in the Form Designer.
  2. Click the Failed - Try Again button, and go to 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_try_again
    • Label:
      Witness status = "TRY_AGAIN"
  6. Leave the Select (select) event type unchanged in the Rule: Pick 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_try_again
    • Label:
      Witness status = "TRY_AGAIN"
  10. Type this script:
    this.getForm().getControl("witstatus").setValue("TRY_AGAIN");
    this.getForm().invokeAction("submit",this);
  11. Click Finish twice.