Explore more
...
Scenarios
Variables
Incremental variables
1min
incremental variables are variables that can be used when you want to keep track of a value when a {{scenario singular lowercase}} or a route in a {{scenario singular lowercase}} runs the incremental variable returns a value of 1 after the first run the subsequent value is based on your choice for the value to never reset, reset after one cycle, or reset after one {{scenario singular lowercase}} run you can add an incremental variable to your {{scenario singular lowercase}} by clicking on to the tools icon and selecting the increment function module example rotating the assignment of tasks to users in a group imagine that you receive a form submission requesting the completion of a task in the following {{scenario singular lowercase}} , an incremental variable is set to count each time a request is submitted and send the task by email to different people, alternating the assignment of the task to alternate the tasks, we are using the mod function to filter the assignments between two people the mod function returns the remainder after dividing one number by another for example, 12 mod 2 = 0, because there is no remainder after dividing 12 by 2 13 mod 2 = 1, because after dividing 13 by 2, there is a remainder of 1 in this {{scenario singular lowercase}} , the incremental variable value is divided by 2 using the mod function, and the tasks are routed to different people based on the remainder being even ( 0 ) or odd ( 1 ) incremental variables add a tool > increment function module and configure the value to never reset add a router you will see two default routes added click the wrench icon for the first route and set the filter label odd condition map the incremental variable and use the mod math function and add the number 2 change the equal to operator from the default text operator to the numeric operator and type 1 in the comparison field click the wrench icon for the second route and set the filter label even condition map the incremental variable and use the mod math function and add the number 2 change the equal to operator from the default text operator to the numeric operator and type 0 in the comparison field complete your {{scenario singular lowercase}} by adding an email module to the end of each route, notifying the recipient of their assignment as information comes in, the task assignment alternates between the two recipients