- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2018 08:37 PM
Hello All,
g_scratchpad is not working in on change client script. I am taking class name of configuration item and storing in scratchpad variables and calling that variable in client script but it is not working. There is display BR written on incident table.
in BR
g_scratchpad.variable_name = current.cmdb_ci.sys_class_name
in on change client script
if(g_scratchpad.variable_name != 'app_instance'){
g_form.setValue('variable_name',value);
}
but it is not working could anyone give suggestion am i doing anything wrong here ?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2018 08:51 PM
g_scratchpad will hold the value if the CMDB_CI field is already populated when the form was loaded. If this is the exact case you are trying then it should work. Also note the value will not be populated in g_scratchpad dynamically i.e when the field CMDB_CI field is populated without saving the form. In that case, you will have to make a GlideAjax call from the client side.
-Pradeep Sharma

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2018 08:51 PM
g_scratchpad will hold the value if the CMDB_CI field is already populated when the form was loaded. If this is the exact case you are trying then it should work. Also note the value will not be populated in g_scratchpad dynamically i.e when the field CMDB_CI field is populated without saving the form. In that case, you will have to make a GlideAjax call from the client side.
-Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2018 09:15 PM
Thank you Pradeep. It is working fine by using GlideAjax.