Configuring the Completed Button

You can write an action script that controls the functionality of the Completed custom button.

Procedure

  1. Open the Interview Witness form in the Form Designer.
  2. Click the Completed 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 on Rule Details page and click Next:
    • Name:
      success
    • Label:
      Submit with witness status = "SUCCESS"
  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:
      success
    • Label:
      Submit with witness status = "SUCCESS"
  10. Type this script this.getForm().getControl("witstatus").setValue("SUCCESS"); as shown:
    this.getForm().invokeAction("submit",this);
  11. Click Finish twice.