why alert is not displaying in catalog client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 06:09 AM
Hi ,
when i try to give alert in catalog client script, it is not displaying anything.
please refer the code,
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var request1 = g_form.getValue('request');
if(request1 =='Complete a job in IWS')
{
alert('Job should be only in Error state');
}
//Type appropriate comment here, and begin script below
}
Thank You.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 06:11 AM
Hi,
Please check the value used in choices and use it for comparison in if condition.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var request1 = g_form.getValue('request');
alert(request1); // check what value is set in backednd and use it in if condtion
if(request1 =='Complete a job in IWS')
{
alert('Job should be only in Error state');
}
//Type appropriate comment here, and begin script below
}
I have added one more alert in your script, it will help you to find actual value used in backend for your options/choices.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 06:44 AM
for the first alert
alert(request1); // check what value is set in backednd and use it in if condtion
it is showing on screen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 06:51 AM
How are you testing this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 07:07 AM
by selecting request choice as complete a job in IWS