# Math Equation Question

Jun 21, 2021

I have a few numeric entry boxes set up to subtract from Variable1. Is there a way (even roundabout) to make it so the value of the numeric entry boxes doesn't continue to get subtracted if the learner changes the value?

Ex: Learner inputs value 25 in numeric entry box 1. 25 is subtracted from Variable1. Learner changes value of numeric entry box 1 to 35. Instead of subtracting another 35 from Variable 1 (for a total of 60), I'd like the 25 re-added and the 35 subtracted.

## 1 Reply

Since you always want to subtract the value of the text-entry box from a consistent value in Variable 1, don't do the calculation within Variable 1. Instead, do the math in another variable. For example, create a variable called Calculation. Then use this series of triggers to set its value:

Those triggers will always subtract the current value of the text-entry box from Variable 1. And that means you don't have to add back a value that was already subtracted.