Block reference / Data

Increase variable

Add a number to a variable, such as a counter.

In both appsWarpX BrowserWarpX Phone

Increase variable adds an amount to a variable that holds a number. Use it for counters: pages visited, accounts processed, attempts made. A negative amount counts down.

The Increase variable block's settings, filled in as in the example below.

Settings

Variable name

The variable to change. It must already exist.

ExampleprocessedCount
Increase by

The amount to add. Use a negative number to subtract.

Example1

Every block also has the shared block settings — a description, Disable block and what to do on an error. Fields that take text accept data from earlier blocks.

What it hands on

Writes the new number into the variable and hands it on as {{prevBlockData}}.

Example: Count the accounts a loop has processed

  1. Start
  2. Insert data
  3. Loop data
  4. Increase variable
  5. Loop breakpoint
  6. Notification
Where Increase variable sits in the example workflow.
  1. Before the loop, add Insert data with a Variable row: processedCount, value 0.
  2. Inside the loop, after the steps for each account, add Increase variable.
  3. Type processedCount in Variable name and 1 in Increase by.
  4. After the loop, use {{variables.processedCount}}, for example in a Notification.

Good to know

  • A variable that does not exist stops the block with Cant find "processedCount" variable. Set it first with Insert data.
  • Text that reads as a number, such as 5, works and becomes a number. Anything else stops the block with is not a number.
  • The amount is a plain number; references are not filled in there or in the variable name.
  • A $$ variable changes for this run only. To keep the new count for later runs, write it back with Insert data under the same $$ name.

See also

  • Insert data — Set variables and add values to the workflow's table, several at once.
  • Loop data — Run the blocks after it once for each row, number, list item or element.
  • Slice variable — Keep part of a variable's text or list, by position.