My situation can be simplified to something like this. I'd like to store the values "A" and then turn it into previousA. And then store the values of "A" again when user change it, and turn it into currentA. So I can do something like:
Create parameters for ‘previous_A’ and 'difference_A'
Create a boolean parameter called ‘set_previous’
You don’t need a parameter for ‘current_A’ because that is ‘A’
if set_previous = 0 then
previous_A = A
PARAMETERS previous_A = previous_A
set_previous = 1
PARAMETERS set_previous = set_previous
difference_A = previous_A - A
PARAMETERS difference_A = difference_A
This will constantly give you the difference based on the original ‘previous_A’.
Now you can set a new value for ‘A’ and turn off the ‘set-previous’ switch and it will reset the ‘previous_A’ value and the switch will instantly turn back on again.
Type in a new value for A and you will have a new difference.
Not quite sure what you would want this for but it will work.
One of the forum moderators. Versions 6.5 to 27 Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10 Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11