December 6, 200421 yr I want to be able to detect a changed value in one field and populate a second or third field. Example: Current Income, Previous Income, Net change. when the Current Income field is changed, I want the original current income moved to the "Previous Income" field and the net change calculated as the difference. I can do the net change. I need to be able to detect the change in the Current Income (without losing the value). If the values of the 3 fields are: CI = 10000 PI = 9000 NC = +1000 now if CI is is changed to 15,000, PI should automatically calculate to 10,000 and NC should calculate to 5,000 (15000-10000). If CI is not changed then PI and NC should not change. TIA, Jim
December 6, 200421 yr You will need an additional field to store the value of Current Income, because once Current Income is changed, any calculations will use the present value. I would suggest using an auto-enter calculation field to track the present and previous value of Current Income. I'll call it cPICI RightWords( Evaluate( "cPICI & " " & CurrentIncome"; CurrentIncome ); 2 ) It should be set as a text result with 'Do not replace existing value for field' deselected. Then set PreviousIncome to be an auto-enter calculation of GetAsNumber(LeftWords( cPICI; 1 )) set as a number result, also with 'Do not replace...' deselected. Then NetChange can be a simple calculation of CurrentIncome - PreviousIncome. Since the Evaluate is set to be triggered only by CurrentIncome, no values will change unless CurrentIncome is modified.
Create an account or sign in to comment