There are two basic ways you can set parameters for an event action:
Access these forms by first selecting an Action Type and then clicking Edit Parameters 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.
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:
The associated button typically opens either of the following:
For example, if you click the Condition button that appears on many event action parameter forms, the system 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 system returns the values you specified, formatted using the correct syntax.
We recommend that you verify the syntax is error-free by clicking the Check Syntax button before proceeding.
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 drop-down 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 enter CreditLimit and then click OK to return to the Event Action Parameter Condition form.
In the Operator drop-down list, you would then select the "greater than" (>) symbol.
Finally, in the Expression 2 field, you would enter 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 either:
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 clicking Edit Parameters again, you will lose all parameter text and need to start over.