Event Handler Fields

In VTA Configuration Manager, you can edit the following fields in the Event Handler screen.

Priority

  • Priority for evaluating and running this event handler.
  • Value—Integer in the range 1–1000; the smaller number has the higher priority
  • Default—No value

Events

  • List of events.
  • Value—Select from the list of configured events. Use the Ctrl or Shift keys to select multiple events.
  • Default—No value

Condition

  • Condition that the event handler evaluates to determine whether the event handler should handle the event.
  • Value—You can specify the condition as a formula, as a JavaScript program, or as one of the following values returned by the JavaScript program:
    • true—Event handler should handle the event.
    • false—Event handler should not handle the event.
  • Guidelines—If no condition is specified, true is returned as the value. If a referenced attribute does not exist in the event, the referenced attribute’s value is null.
  • Default—true
  • Example—The following example is a condition that must be met to refill a quota:
      var newBalance=<balance_BoughtQuota>+<balance_PeriodicQuota>;
      if(<old_balance_PeriodicQuota>==null) <old_balance_PeriodicQuota>=<balance_PeriodicQuota>;
      if(<old_balance_BoughtQuota>==null) <old_balance_BoughtQuota>=<balance_BoughtQuota>;
      return <old_balance_PeriodicQuota>+<old_balance_BoughtQuota><=0&&newBalance>0;

Actions

  • Actions that the event handler performs in response to an event.
  • Value—Use the Add and Remove buttons to create a list of selected actions. Multiple actions are performed in the order specified in the list.
  • Default—No value