Skip to main content
Nintex Community Menu Bar
Solved

Math Operation Calculating Previous Values

  • August 2, 2023
  • 2 replies
  • 65 views
  • Translate

Forum|alt.badge.img+4

We have a workflow that takes information from two Sharepoint Lists and matches them together based on PERNER (Employee ID). Then take that information and send an email to each Employee.  The issue is that each PERNER can have several Bucket Total Entries  This is why we need to calculate the total sum of the entries returned for each PERNER and store it as a new variable.

 

Here is an example 

 

This is the Bucket Total for one PERNER the total for this PERNER should be 7,496 instead, the workflow adds the previous PERNER’s Bucket Total to this total. With that said, by the end of the workflow we essentially have a grand total of all PERNERs instead of individual total for each PERNER.

 

Here is how the workflow is arranged

Part of workflow Where this occurs 

 

Query List Action 
For Each Loop
Math Operation 

 

Best answer by BobR

Sounds like you don’t reset the value between each loop. What you can do is after sending the email add a “Set Variable” action within the outer For Each loop that sets the “var_TotalPoints” back to 0 so the variable doesn’t retain the value it accumulated in a prior loop.

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

2 replies

  • 73 replies
  • Answer
  • August 2, 2023

Sounds like you don’t reset the value between each loop. What you can do is after sending the email add a “Set Variable” action within the outer For Each loop that sets the “var_TotalPoints” back to 0 so the variable doesn’t retain the value it accumulated in a prior loop.

Translate

Forum|alt.badge.img+4
  • Author
  • Rookie
  • 21 replies
  • August 2, 2023
BobR wrote:

Sounds like you don’t reset the value between each loop. What you can do is after sending the email add a “Set Variable” action within the outer For Each loop that sets the “var_TotalPoints” back to 0 so the variable doesn’t retain the value it accumulated in a prior loop.

Thanks Bob! Solved it perfectly!

Translate

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