Increment Counter

The amps-action-do-increment-counter module allows AMPS to increment a counter by a value. Counters persist across action runs, and are saved in the instance memory until the instance is restarted.

If a counter with the specified name does not currently exist in the instance when the action runs, AMPS creates the counter with a value of 0 and then immediately increments it with the specified value. If the counter is already present, AMPS will simply increment the counter.

To see an example of amps-action-do-increment-counter, refer to the Action Configuration Examples section at the end of this chapter.

This module requires a Key that tells AMPS which counter to increment and a Value that tells AMPS where to store the incremented value.

ParameterDescription

Key (required)

The name of the counter that AMPS will increment.

There is no default value for this parameter.

Value (required)

The variable in which to store the current value of the counter.

This module adds a variable that contains the counter, as specified in the Value parameter, to the current context.

Last updated

Copyright 2013-2024 60East Technologies, Inc.