Reset counter value¶
Resets the current counter value to zero..
Future<void> Backendless.counters.reset(String counterName);
IAtomic counter = Backendless.counters.of(String counterName);
Future<void> counter.reset();
where:
Argument | Description |
---|---|
counterName |
name of the counter to reset. |
Example¶
Function callback = (result) => print("counter has been reset");
Backendless.counters.reset("my counter").then(callback);
IAtomic myCounter = Backendless.counters.of("my counter");
myCounter.reset().then(callback);
Codeless Reference¶
where:
Argument | Description |
---|---|
counter name |
Name of the counter whose value must be set to 0. |
This operation does not return a value.
Consider the following counter:
The example below resets the value of the "CarsParkingLot"
counter 0
.
The result of this operation will look as shown below after the Codeless logic runs: