Increase variable
Add a number to a variable, such as a counter.
In both apps
WarpX Browser
WarpX 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.
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
- Start
- Insert data
- Loop data
- Increase variable
- Loop breakpoint
- Notification
- Before the loop, add Insert data with a Variable row:
processedCount, value0. - Inside the loop, after the steps for each account, add Increase variable.
- Type
processedCountin Variable name and1in Increase by. - 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 withis 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.