diff --git a/Client-Side Components/Client Scripts/Detect oldValue newValue and Operation in Glide List Type Fields/detectOldValuenewValueOperation.js b/Client-Side Components/Client Scripts/Detect oldValue newValue and Operation in Glide List Type Fields/detectOldValuenewValueOperation.js
new file mode 100644
index 0000000000..87cb6ded61
--- /dev/null
+++ b/Client-Side Components/Client Scripts/Detect oldValue newValue and Operation in Glide List Type Fields/detectOldValuenewValueOperation.js
@@ -0,0 +1,43 @@
+function onChange(control, oldValue, newValue, isLoading, isTemplate) {
+ if (isLoading) {
+ return;
+ }
+
+ var prevValue;
+ if (g_scratchpad.prevValue == undefined)
+ prevValue = oldValue;
+ else {
+ prevValue = g_scratchpad.prevValue;
+ }
+ g_scratchpad.prevValue = newValue;
+
+
+ var oldGlideValue = prevValue.split(',');
+ var newGlideValue = newValue.split(',');
+
+ var operation;
+
+ if (oldGlideValue.length > newGlideValue.length || newValue == '') {
+ operation = 'remove';
+ } else if (oldGlideValue.length < newGlideValue.length || oldGlideValue.length == newGlideValue.length) {
+ operation = 'add';
+ } else {
+ operation = '';
+ }
+
+ var ajaxGetNames = new GlideAjax('watchListCandidatesUtil');
+ ajaxGetNames.addParam('sysparm_name', 'getWatchListUsers');
+ ajaxGetNames.addParam('sysparm_old_values', oldGlideValue);
+ ajaxGetNames.addParam('sysparm_new_values', newGlideValue);
+ ajaxGetNames.getXMLAnswer(function(response) {
+
+ var result = JSON.parse(response);
+
+ g_form.clearMessages();
+ g_form.addSuccessMessage('Operation Performed : ' + operation);
+ g_form.addSuccessMessage('OldValue : ' + result.oldU);
+ g_form.addSuccessMessage('NewValue : ' + result.newU);
+
+ });
+
+}
diff --git a/Client-Side Components/Client Scripts/Detect oldValue newValue and Operation in Glide List Type Fields/readme.md b/Client-Side Components/Client Scripts/Detect oldValue newValue and Operation in Glide List Type Fields/readme.md
new file mode 100644
index 0000000000..cb2b0e5533
--- /dev/null
+++ b/Client-Side Components/Client Scripts/Detect oldValue newValue and Operation in Glide List Type Fields/readme.md
@@ -0,0 +1,39 @@
+In Client Scripts, oldValue will display the value of last value/record which is stored in that field.
+For new records, it is generally empty and for existing records it displays the value which is stored after load.
+If we will try to change the value in that field, it will still show oldValue the same value which was there during the load of form.
+
+So, In order to identify the oldValue on change(as it does in business rule(previous)), This script comes handy and also it will
+detect the action performed.
+
+
+This onChange Client script comes handy when dealing with Glide List type fields where we have to detect whether the value was added or removed and returns the display name of users who were added/removed along with name of operation performed.
+
+Setup details:
+
+onChange client Script on [incident] table
+Field Name: [watch_list]
+Script: Check [detectOldValuenewValueOperation.js] file
+Script Include Name: watchListCandidatesUtil (client callable/GlideAjax Enabled - true), Check [watchListCandidatesUtil.js] file for script
+
+
+
+Output:
+
+Currently there is no one in the watchlist field:
+
+
+
+
+Adding [Bryan Rovell], It shows the operation was addition, oldValue as 'No record found' as there was no value earlier.New Value shows the name of the user (Bryan Rovell)
+
+
+
+Adding 2 users one by one:
+
+
+
+
+Removing 2 at once:
+
+
+
diff --git a/Client-Side Components/Client Scripts/Detect oldValue newValue and Operation in Glide List Type Fields/watchListCandidatesUtil.js b/Client-Side Components/Client Scripts/Detect oldValue newValue and Operation in Glide List Type Fields/watchListCandidatesUtil.js
new file mode 100644
index 0000000000..26616d6049
--- /dev/null
+++ b/Client-Side Components/Client Scripts/Detect oldValue newValue and Operation in Glide List Type Fields/watchListCandidatesUtil.js
@@ -0,0 +1,37 @@
+var watchListCandidatesUtil = Class.create();
+watchListCandidatesUtil.prototype = Object.extendsObject(AbstractAjaxProcessor, {
+
+
+ getWatchListUsers: function() {
+
+ var oldUsers = this.getParameter('sysparm_old_values');
+ var newUsers = this.getParameter('sysparm_new_values');
+
+ var result = {
+ oldU: this._getUserNames(oldUsers),
+ newU: this._getUserNames(newUsers)
+ };
+
+ return JSON.stringify(result);
+ },
+
+
+ _getUserNames: function(userList) {
+ var names = [];
+
+ var grUserTab = new GlideRecord('sys_user');
+ grUserTab.addQuery('sys_id', 'IN', userList);
+ grUserTab.query();
+ if (grUserTab.hasNext()) {
+ while (grUserTab.next()) {
+ names.push(grUserTab.getDisplayValue('name'));
+ }
+ return names.toString();
+ } else {
+ return 'No record found';
+ }
+ },
+
+
+ type: 'watchListCandidatesUtil'
+});