### Sending out messages

You can specify whether to send out a message, including the built-in message 0001 - Filter, 0002 - Sort, or 0003 - Parameter, or a user defined message when a specific event occurs on a certain object in a library component. The objects from which messages can be sent out include fields in table/crosstab, labels in the content, geographic maps, parameter controls, the Submit button of parameter form controls, and some chart elements (data markers, legend and category axis labels).

To send out a message:

1. Do one of the following to open the Send Message - Web Action Builder dialog. See the dialog.

   - Right-click a field or label in a table/crosstab, or a label, a parameter control or the Submit button of a parameter form control which is not in the library component's configuration panel, select Display Type from the shortcut menu to display the Display Type dialog, select a trigger event from the drop-down list in the Events column and click in the Actions column of the Web Behaviors box to display the Web Action List dialog, then select *SendMessage and click OK.
   - In the Behaviors tab of some chart formatting dialogs, select a trigger event from the drop-down list in the Events column and click in the Actions column, then select *SendMessage and click OK in the displayed Web Action List dialog.
   - Right-click a geographic map and select Geographic Map Wizard from the shortcut menu, or drag Geographic Map from the Toolbox to a library component to display the Create Geographic Map wizard, select a dataset in the Data screen and add a field to the Drill Path box in the Display screen of the wizard, click Web Behaviors button in the Display screen to display the Web Behaviors dialog, select a trigger event from the drop-down list in the Events column, click in the Actions column and click in the Actions column. Then select *SendMessage in the Web Action List dialog and click OK.
2. Select the message you want to send out from the Message drop-down list.
   - 0001 - Filter
     Specifies to send out the built-in Filter message, which will ask the data component that receives the message to filter itself based on the filter condition defined in the message.
   - 0002 - Sort
     Specifies to send out the built-in Sort message, which will ask the data component that receives the message to sort itself based on the sort condition defined in the message.
   - 0003 - Parameter
     There are two types:
     - Automatic
       Specifies to send out the built-in Parameter message with all the parameter values used in the current library component, which will ask the library component in which the data component that receives the message is to rerun itself using the same parameter values.
     - Customized
       Specifies to send out the built-in Parameter message, which will ask the library component in which the data component that receives the message is to rerun itself using the parameter value defined in the message.
   - User Defined
     Specifies to send out a user defined message.
3. Define the message as you want.

   For the built in message, you can change the values for the keys in the Value column. To make the condition dynamic, select the values under the Dynamic Key node.

   For a user defined message,

   1. Specify the ID and Name of the message in the ID and Name text boxes. The ID should be a natural number beyond 1000.
   2. Click to add a message key-value line for the user defined message.
   3. In the Key column, specify a key from the drop-down list or select the <Input...> item from the list and then input a key into the text box.
   4. In the Value column, specify the value of the key from the drop-down list or select <Input...> from the list and then input a value into the text box.
   5. If you choose to input the value by yourself in the above step, you need to specify the data type of the value. If the value is selected from the Value drop-down list, the data type of the value is automatically displayed in the Data Type column and cannot be changed.
   6. If necessary, click to add a new message key-value line and specify the key, data type and value respectively.

      To delete a message key-value line, select it and click . To adjust the order of the lines, click or .

   Tip: You can also create a blank user defined message by only specifying the ID and name of the message.

4. Click the OK button to confirm the settings.
5. In the dialog you are returned to, add more event lines and repeat the above steps to specify to send out more messages as you want.
6. When done, click OK to finish defining the messages to send out.

In addition to the above method, another more convenient way to send a message is by using the Send Message command. To do this, right-click a field in a table/crosstab, a label in the content, a parameter control, the Submit button of a parameter form control, a data marker or an category axis label or the legend in a chart in a library component, from which you want to send the message, and select Send Message > Filter/Sort/Parameter/Customize from the shortcut menu (for the Submit button of a parameter form control, only Parameter and Customize are available).

- If Filter is selected, a built-in Filter message, whose trigger event is Click by default, will be created.
- If Sort is selected, a built-in Sort message, whose trigger event is Click by default, will be created.
- If Parameter is selected, a built-in Parameter message with the Automatic type, whose trigger event is Click by default, will be created.
- If Customize is selected, you can define the message by yourself in the Send Message dialog. See the dialog.
  1. Check a trigger event in the Events box, then click on the name of the event to select it.
  2. Define the message that will be triggered on the event.
  3. Repeat the above two steps to define other messages that will be sent out from the object on different events.
  4. Click OK to accept the settings.