- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2019 11:11 AM
Create a separate related list, a replica of the current list and configure it to show in the change request view alongside the current related lists.
In the newly created related lists, configure the filter to show only p1 and p2 incidents and set that as default filter.
Then Create a client script onload on change request table and add this code
function onLoad() {
//hide both related lists on load.
g_form.hideRelatedList('incident.caused_by');
g_form.hideRelatedList('incident.caused_by_new'); //This is the new related list name.
if(g_form.getValue('type')=='emergency') {
g_form.showRelatedList('incident.caused_by_new');
} else {
g_form.showRelatedList('incident.caused_by');
}
}
To created related lists, kindly refer to following links
https://docs.servicenow.com/bundle/london-platform-user-interface/page/administer/form-administration/task/t_CreateDefinedRelatedLists.html
https://docs.servicenow.com/bundle/london-platform-user-interface/page/use/using-forms/concept/c_RelatedLists.html
Mark the answer as correct and helpful if this works.