Client script oldValue always empty

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 12:12 PM
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.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 12:14 PM
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 12:20 PM
Yes I know how it works. I have changed it twice and it returns empty still.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 12:21 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 12:35 PM
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?