Skip to main content
Nintex Community Menu Bar

How to Increment or Decrement values in a Workflow

  • February 15, 2022
  • 0 replies
  • 737 views
  • Translate

MillaZ
Nintex Employee
Forum|alt.badge.img+21
  • Nintex Employee
  • 667 replies
 

How to Increment or Decrement values in a Workflow

KBS100095

PRODUCT
K2 Cloud
K2 Five
TAGS
Inline Functions
Workflow
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.

Objective

There may be a need to Add, Subtract, Multiply or Divide values in a workflow. This can be done with Functions in the K2 Five Designer.

Before You Begin

This solution uses data fields, but this can be used for any field in the Workflow. We can call a SmartObject method and Add or Subtract before adding it to a Email or Data Field. However, creating data fields when doing this is recommended. Good naming conventions will make this much easier to keep track of which values are being Modified and which are the Outputs.

How-to Steps

1. Create 2 data fields. Name one Before Increment and one After Increment. Make sure to set these fields to Number or Decimal.

2. Create a Set Data Field event. Choose the After Increment field to be updated.

3. In the Set Data Field event drag the Formula Function into the Set Data Field event. The Formula Function is found under the Mathematical node. See the pictrue below:

 

Image

 

 

4. The Formula Function will pull up a separate wizard where you can create the Formula you would like. To increment simply drag the Before Increment Data Field into the box and type +1. This will Increment the After Decrement Data Field by 1. See the following picture:

 

Image

 

5. You can use this in conjunction with a Loop to increment a certain number of times.

 

Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings