Client script oldValue always empty

Brian Lancaster
Tera Sage

I am writing an on Change script for the change module.   When I try and if (newValue == 'This' && oldValue == 'that') it is not working.   So I did a alert(newValue) along with an alert(oldValue) and oldValue is away returning as empty.   What might be causing oldValue not to return anything?   Just note that newValue is always returning what I expect it to.

13 REPLIES 13

Raghu Loganatha
Kilo Guru

Brian,



OldValue will return null if you are changing from None to xxx. Can you try changing twice ?
Once from None to a different value and then to another value ?


Yes I know how it works.   I have changed it twice and it returns empty still.


vinothkumar
Tera Guru

Hi Brian,



It will contains the value only when the record was loaded into the form.


find_real_file.png


So what you are saying is oldValue is useless as when the form load it will always be empty because the value when the form is loaded is empty.   Is there a way to get the previous value?