Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7290 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

This topic is 7290 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.