{ESTOP: target_field_name,
field_value = field_value
[, field_display_value = field_display_value] [, page_title = message_to_display_to_user]
[, button_yes = button_title]
[, button_no = button_title]
[, button_cancel = button_title] [, window_height = height]
[, window_width = width]}
The ESTOP
, or Extended Stop action allows the administrator to configure the STOP
action by providing a configurable message and configurable buttons that appear to the user when the action is triggered. Note that the action rule must be used in conjunction with a "flag" field. The reason is that simply introducing a pause into the pre-update process means there is a likelihood that the rule will be executed again when the user clicks the continue button, and the ESTOP rule wlll then trigger again. View the example below on how to use a field, which may be hidden from view to the user, to avoid this problem.
<== preupdate ==>
rule directive target_field_name
must exist on the form and be writable. This parameter is requiredfield_display_value
parameter is only used with fields that have a POPUP display type (only list and user fields may be configured with POPUP attributes field_value
must be providedpage_title
parameter is the message that will appear to the user within the popup dialog that is triggered with the action. This message may contain valid HTMLbutton_yes
, button_no
and button_cancel
parameters allow you to display different labels on the Yes, No and Cancel buttons that appear on the popup dialog. These are optional. For example, you might only provide the button_yes
and button_no
buttons on the popup dialogwindow_height
and window_width
parameters should be integer numbers, for the height and width of the popup dialog window, expressed in pixels.As a precursor to executing this example rule, the administrator will have placed the PRIORITY field on the layout, and there will be a text field named FLAG_FIELD on the layout. The flag field may be hidden.
<== preupdate ==>
if (PRIORITY!='High' && IS_HIGH_RISK = 'Yes' && RISK_FLAG_FIELD != 'Y') {
{ESTOP: 'PRIORITY',
FIELD_VALUE = 'Yes',
BUTTON_YES = 'Yes, set the Priority to High',
BUTTON_NO = 'No, leave Priority as is',
PAGE_TITLE = '<b>This issue has been identified as High Risk, should the Priority be set to High?</b>',
WINDOW_HEIGHT = 250,
WINDOW_WIDTH = 500
};
RISK_FLAG_FIELD='Y';
}
This will result in a popup when the rule is triggered. This will have the message "This issue has been identified as High Risk, should the Priority be set to High? There will be two buttons with the labels Yes, set the Priority to High and No, leave Priority as is. At the same time, the value of RISK_FLAG_FIELD is set to Y, which prevents the ESTOP rule from firing a second time.
It is not easy to enter more than simple HTML for the PAGE_TITLE
parameter within the rules editor. You can consider entering the HTML into an HTML Area field, either hidden on the current form or held in a different Business Area / Project and accessed with a LINK directive rule. Then you can simply refer to a hidden field within the same Business Area / Project like so:
PAGE_TITLE = field_name;