I’m trying to capture the previous value from an AfterFieldChange event.
For example, the current customer name is “John,” but when I select “Jane,” in a selection field, it always seems to return only Jane, but I want a temp variable to hold John at least.
Things like args.ProposedValue, grabbing the text specifically from the textbox (Textbox.Text,) and various other things seem to be only grabbing the newly entered string.
Typing or entering a name into the field with the use of BeforeFieldChange nets the same result, I can’t seem to grab what’s already in the text field, it only grabs what is entered.
I’m sure there is a better way, but you could set up two fields. One as your in between and the second as your previous value.
A - current field
B - in between
C - previous value
When A changes, if B does not equal A, change C to equal B and B to equal A.
C will now be equal to the old value and A & B are equal to the new value.
The issue is I can’t seem to grab the current value short of typing out as a string literal. For example, calling out the textbox.Text outside of either event handler returns an empty string.