MRVS - Clear other input fields after one variable is changed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2022 10:20 AM
I want to clear all other input fields in the popup window for a MRVS when the first out of four variable has changed. Here is what the current script looks like:
function onChange(control, oldValue, newValue, isLoading) {
alert("HERE!");
if (isLoading) {
return;
}
// Clear values when environment is changed
g_form.clearValue('direct_report');
g_form.clearValue('current_delegate');
g_form.clearValue('new_delegate');
}
However, nothing happens when I change a value (not even the alert), whether from an existing row or creating a new row. I suspect this has something to do with my onLoad script, which uses GlideAjax to call an REST API async and populate some rows in the MRVS. Could this affect the onChange Script or am I doing something else wrong? Any help is appreciated!
- 883 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2022 10:52 AM
can you send the screenshot of the entire client script .
Not just script the entire screen i need
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2022 10:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2022 10:58 AM
this is correct i feel can you try deactivting the on load client script and test this
at least we will get to know that on load is causing the issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2022 10:59 AM
Even if I deactivate the onload script, the alert will not show up
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2022 11:07 AM
i suggest delete the client script and create it again .
it worked for me with the same scenario
but try deleting it and creating it again