Counter

From SAP Enable Now Wiki

Scope

Purpose

A Counter object allows you to trigger different actions based on the number of successive clicks made on a specific object. Each click on the ‘trigger object’ increases the counter, and then a different action can be assigned to each ‘count’ (value of the counter). Technically, you can use multiple trigger objects, but that scenario is better suited to a Collector object.

Use

To insert a Counter object, select menu option Insert > Action Objects > Counter (or click on the Action Objects button and select Counter from the drop-down panel. The Counter object is added as an icon outside the upper edge of the Page. Click on this icon to display its Property Sheet and maintain its properties as described below.

To increase (or reset) the counter, go to the Actions properties for the trigger object. Add a new entry for the relevant trigger event (such as On Click), specify the Counter as the target object and select the appropriate action to perform for the Counter (see below).

Properties

Available Actions

The following Actions can be selected for a Counter when it is used as the target of a triggered event:

  • Count Up: Increase the value of the Counter by 1. This will automatically trigger any On Count event that has a Count value equal to the new value of the Counter.
  • Disable: Prevent any of the Counter's actions from being triggered. This is useful if you want to temporarily prevent the counter from being increased (for example, during display of a message).
  • Enable Allow the Counter's actions to be triggered (typically, after they have previously been disabled, or if the initial state of the object is disabled - see the Enabled property).
  • Reset: Reset the Counter to 0.