Configuring the Completed Button
You can write an action script that controls the functionality of the
Completed custom button.
Procedure
-
Open the
Interview Witness form in the Form Designer.
-
Click the
Completed button and view its
Properties view.
-
Click the
Rules tab on the
Properties view.
-
Click the
Add Rule button against the event type
Select (select).
-
Add following inputs on
Rule Details page and click
Next:
-
- Name:
-
success
-
- Label:
-
Submit with witness status = "SUCCESS"
-
Leave the
Select (select) event type unchanged in the
Choose Events page and click
Next.
-
Click the
(plus) button in the
Define Actions page.
The
Add Action to Rule page opens.
-
Select options
Create a new action and
Script Action, and click
Next.
-
Type the following values in the input fields:
-
- Name:
- success
-
- Label:
-
Submit with witness status = "SUCCESS"
-
Type this script
this.getForm().getControl("witstatus").setValue("SUCCESS"); as shown:
this.getForm().invokeAction("submit",this);
-
Click
Finish twice.
Copyright © Cloud Software Group, Inc. All rights reserved.