- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 01:52 PM
i have a onChange catalog client script that DOES change the field values so it is running but it doesn't throw the alert.
if(newValue == 'No'){
alert(getMessage('test'));
g_form.setValue('foo' , 'No')
g_form.setValue('bar' , 'No')
}
--or
if(newValue == 'No'){
alert('test');
g_form.setValue('foo' , 'No')
g_form.setValue('bar' , 'No')
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2016 06:53 AM
clear cache and check to clear form data and that should resolve that part of it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 03:43 PM
Open the browser developr tools and see if you can find any errors in the
cosole
On Thursday, July 21, 2016, sigmachiuta <community-no-reply@servicenow.com>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 03:49 PM
huuuuuuuh! thats weird it should be newValue... and it is in my code and blue
Uncaught ReferenceError: newvalue is not defined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 03:50 PM
oh wait thats why it didnt alert before the IF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 03:53 PM
*** WARNING *** GlideAjax.getXMLWait - synchronous function - processor: SysMessageAjax
onChange on foo.... now it does change the values !
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
//Type appropriate comment here, and begin script below
alert(getMessage('new value is ' + newValue)); // it was this new value
if(newValue == 'No'){
alert(getMessage('test'));
g_form.setValue('bar' , 'No');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 03:59 PM
You can ignore that. It still does not alert anything!! That is weird
On Thursday, July 21, 2016, sigmachiuta <community-no-reply@servicenow.com>
