The Action Panel is used to provide a description of the action, define when the conditions for the action will be evaluated, and determine which answer the action will be associated with.
screenshot
To create an Action:
- Click Add.
This will add a line to the list of actions, and enable you to enter the criteria for the new action. - Add a meaningful description for the new action.
- Select when the new action will be triggered. There are two options for this, available from the drop-down list:
- Event: An event is when something happens, either a button click, entry into a field, selection of radio button, etc. In this case, event is used to mean that the value of a field will be evaluated based on data in a field or answer.
- Load: If you choose load, the action is triggered when the dialog is loaded.
- Select an answer or field that will be evaluated as part of this action (Screen sample and description below).
Operations Panel
The Operations Panel is used to configure the criteria for the operations that will be triggered when the actions is executed. There are several available operations that can be selected, and each may be used in conjunction with the various target types, as described below.
There are several steps in defining the Operations for the action you are building.
- Select Add and Configure Operation:
- Enable – enables you to make a field available, or enable the field on the dialog.
- Disable – enables you to make the field unavailable, or disable the field on the dialog.
- Hide – enables you to hide the field on the dialog.
- Show – enables you to make a field visible on the dialog.
- Set Value – enables you to define the value of a field on the dialog.
- Function – enables you to call a custom or available core function from the dialog.
- Choose the appropriate target type from the available options in the Operations Panel:
- Question – Available with Enable, Disable, Hide and Show Operations, this target type enables you to associate the action with a question on the dialog.
- Answer - Available with Enable, Disable, Hide and Show Operations, this target type enables you to associate the action with an answer on the dialog.
- Script Data – available with all operations EXCEPT Function, this target type enables you to associate a defined Script Data element with the action.
- Element ID – available with all operations EXCEPT Set Value and Function, this target type enables you to associate a field Element ID with the action. Use the chart below as a quick reference to see which Target Type is available with the various Operations:
- Define the target based on the combination of the Operation and Target type you have selected. Please note that not all options will be available for each combination, but you will be able to choose from the following targets:
- Question – from the drop-down, a list of questions will be displayed, and you can choose from the available choices.
- Answers – from the drop-down, a list of questions will be displayed, once the appropriate question has been highlighted, you can choose from the available answers for that question.
- Script Data – from the drop-down, an alphabetized list of all Script Data elements within the script will be displayed. You can choose any of the fields in the list.
- Element ID – Not Currently Used.
- Function – from the drop-down, you can choose from the list of local and global functions that are available within the script.
- Set the values, if you have selected the Set Value or Function operation. Since these operations require values to function properly, you must define the values you want to use. For the Set Value operation, this is generally going to be the literal value that you want the associated field set to. For the Function operation, you will most likely be required to set multiple values for the function to operate properly. If this is the case, then the multiple values should be separated by a comma.
- Set the value of the Call If column. The options are simply True or False, and they reference the settings made in the Conditions Panel. If you are evaluating or comparing data elements, and you want to run the action if the result of the evaluation or comparison is True, then set the Call If column to True. Likewise, if you want the action to run if the evaluation is False, then set the column accordingly.
Conditions Panel
The Conditions Panel enables you to define under what circumstances the action is to take place. You can compare or evaluate the value of the various fields in the script to other fields, or to literal values. In the screen above, you can see that by clicking on the Add button within the Conditions Panel, a blank condition is added.
To add a condition, follow these steps:
- Click the Select label.
- A list of available fields from the script is displayed in alphabetical order. Choose the appropriate field to be evaluated.
screenshot - Click the Operands (“=”) in the condition.
- A list of available operands will be displayed. Choose the appropriate one for the evaluation.
- Click the Enter Value label in the right column.
- Choose either Constant to add a literal value to the equation, or choose Script Data to select a data element from the script, or Calculation to compare the values of two fields, to use in the
comparison. - If you selected Constant in the above step, you will now have a chance to enter the literal value that you want to use for the comparison.
Once you have entered the value, press Enter to add the criteria to the list.
If you want to add more criteria, follow the steps for adding conditions again. There is no theoretical limit to the number of conditions that can be added for an Action. The conditions will
be evaluated in sequence starting from the top of the list and working down.- If you selected Script Data in the above step, you will be presented with a list of the Script Data elements in alphabetical order. Select the data element you want to use in the comparison.
- After you have entered the value, press Enter to add the criteria to the list.
If you want to add more criteria, follow the steps for adding conditions again. There is no theoretical limit to the number of conditions that can be added for an Action. The conditions are evaluated in sequence starting from the top of the list and working down.
Adding a group enables you to add multiple evaluations inside of one large group that will be considered together. When you add a group, you can set whether all of the criteria in the group are true or none of the criteria in the group are true.
Add to the Group enables you to add more criteria inside a selected group.