Adding an Execute procedure command event action

Use the Execute procedure action to run a procedure command after the specified event occurs

About this task

To add an Execute procedure event action to an object:

Procedure

  1. Select the object in the editor window. Double-click the event that you want to trigger the action from the Events view. The [objectname] Behavior window opens.
  2. Click the Add icon. The Add New Action window opens.
  3. Select Execute procedure in the actions tree and click Next to open the Execute procedure action parameters page.
    Note: To quickly find the required event action, type the name of the action in the filter text field.
  4. Use the From Repository field to enter the procedure statement name and location.
  5. Select the Hide procedure result windows check box to hide the results window after running the procedure statement.
  6. Select the Refresh display on completion check box to refresh the dashboard display after running the procedure statement.
  7. Select the Display a message box indicating the result of the operation check box to display the success or failure of the run procedure statement.
    If you check this check box:
    • Type the text that you want displayed upon a successful run in the Success field. You can use $ (1) in your message to include the system output message as part of the success message text.
    • Type the text that you want displayed upon a failed run in the Failure field. You can use $(1) in your message text to include the system output message as part of the failure message.
  8. Check the Save the success or failure (and any return value) in a specified result parameter check box to save the result of the executed procedure statement in either a local or global parameter. When this check box is selected the Result parameter lists become available. The local and global parameters that have been created for your dashboard are listed in the Result parameter drop-down lists. Select the local or global parameter that you want to use to store the result information.
    The results will be stored as follows:
    • If the procedure statement returns one or more values, the first column in the first row is placed in your selected global or scene parameter. For example, the statement select count(*) from MyTable will place the count in your selected parameter. The statement select A, B, C from MyTable will place the value of A from the first row in your selected parameter.
    • If the procedure statement does not produce results, the success or failure of the statement execution is placed in your selected parameter. For example, the statement update MyTable Set A = 3 where CustomerID = 1 will place true or 1 in your selected parameter if the statement executed successfully, or false or 0 if the statement failed to execute. When this parameter is initially created, it has a data type of Boolean. You can modify the name and data type of the global parameter.
  9. Click Finish. The Execute procedure action is added. The Add New Action window closes.
  10. From the [objectname] Behavior window, click Apply to apply all actions that have been added for the event. Click OK to close the [objectname] Behavior window.