Setting Event Action Parameters

There are two basic ways you can set parameters for an event action:

  • Use the event action parameter forms associated with each action type.

    To access these forms, select an Action Type and then click Edit Parameters on the Event Actions form.

  • Specify the parameters directly in the text edit field on the Event Actions form.

You can also begin with the event action parameter forms and then manually edit the output in the Event Actions form.

Note:  If you are familiar with the parameters, functions, and syntax for the action parameters, you can manually enter the parameter information in the text field. However, unless you are very confident in your ability to write this data from scratch or you are pasting in data from a reliable source, and to help ensure that you use only valid parameters, functions, and syntax, we recommend that you use the event action parameter forms, which have been designed specifically for this purpose.

Tips and Guidelines for Using the Event Action Parameter Forms Effectively

While the event action parameter forms make it easier to set event action parameters than creating them manually, you must still be somewhat familiar with the parameters, functions, and syntax available for each action type. Probably, the best way to do this is to open the form associated with each action type and access the online Help for that form and its fields. There is also extensive reference documentation provided in the Guide to the Application Event System.

Each event action parameter form includes only those parameters and functions that will work for the selected action type. So, for example, if you are creating an action to notify recipients of something, only the parameters you might need to create that notification are available from the Event Action Notify form.

Most options on an event action parameter form include both a field and a button. The field might be any of these types:

  • A text edit field into which you can directly enter the value for that option.
  • A drop-down list from which you can select the value you want.
  • A combo box that allows you to either select a value from a drop-down list or enter the value manually.

The associated button typically opens either of these forms:

  • The Event Action Expression Editor, which is a generic form used to create desired values using expressions.

    For more information, see Using Expressions in Event Action Parameters.

  • Another auxiliary event action parameter form specifically designed to help with the creation of an appropriate value for that option.

    For example, the Condition button on many event action parameter forms opens the Event Action Parameter Condition form, which is designed specifically to make it easier to create and format an appropriate condition statement for the event system to use.

When you click OK in the event action parameter form, the values you specified are returned to the parent form, formatted using the correct syntax.

To verify the syntax is error-free, click the Check Syntax button before proceeding.

Example

As part of an event that notifies a manager when a customer's credit limit has been changed, suppose you want to prompt a Credit Manager for approval if the new credit limit is $500,000 or less. If the new credit limit is more than $500,000, then the Credit Supervisor must approve the change. You could use a Branch action type to determine who gets the prompt message.

To handle this situation, you would create an event handler that runs every time a customer's credit is changed. After using the Event Handlers form to create the handler, you would then click Event Actions to open the Event Actions form. There, for one of the actions, you would assign an action sequence number and select Branch in the Action Type field.

At this point, you would click Edit Parameters to open the Event Action Branch form. That form has two fields and one button (besides the OK and Cancel buttons). Since you want to use the auxiliary form to set the condition, you would click the Condition button.

In this example, the condition must be set so that if the value of the CreditLimit property is less than or equal to than 500,000, then the event handler proceeds to the next action step. Otherwise, if the CreditLimit property is greater than 500,000, then the action flow branches to a different action step.

When the Event Action Parameter Condition form opens, you decide to use the Expression buttons to help set up the condition. Clicking the Expression 1 button opens the Event Action Expression Editor, which you will use to set up the first part of the condition. You want to specify the value of the CreditLimit property, so you select PROPERTY (or P) from the Select a function list.

After you select the PROPERTY function, the Event Action Expression Editor adds a Parameter 1 field. In this field, because you know the name of the property for which you want to return the value, you would simply specify CreditLimit and then click OK to return to the Event Action Parameter Condition form.

In the Operator field, you would then select the "greater than" (>) symbol.

Finally, in the Expression 2 field, you would specify 500000. In this case, you do not need to use the Event Action Expression Editor, because you know the value you want to use, and you want to "hard-code" it to that value.

When you click OK, the system returns you to the Event Action Branch form and populates the Condition field. In the Destination field, then, you would perform one of these actions:

  • Select the number of the action sequence step you want the handler to go to if this condition tests TRUE (if the target action sequence step already exists).
  • For an action sequence step that does not yet exist, specify the number of the step you plan to create for the target later.

When you click OK, the system returns to the Event Actions form, with the correct parameter text.

At this point, we recommend that you click Check Syntax to verify that the parameter syntax is all correct. If there is an error, you will see a rather long and involved error message. You can use this error message to determine where and what the error is likely to be by concentrating on the line on which the error appears and the "Preceding context". In many cases, such as this one, you must have the property name in quotation marks, or the system returns an error. (In fact, missing quotation marks are the most common cause of syntax errors.)

If this happens, try to correct the error manually and then click Check Syntax again. Keep doing this until you have eliminated any errors.

Caution: If you do not correct any syntax errors before you click Edit Parameters again, you will lose all parameter text and need to start over.
Related topics