How to display only P1 and P2 incidents under emergency change request's related list "Incident pending change"

shivaprasad3
Kilo Contributor

Hi ,

I wanted to display only P1 and P2 incident in the emergency change request to map the affected incident for the change.

Please find the below screenshot.

Where i we have to display only the P1 and P2 under "incident pending change".

Note this is the "emergency change"

find_real_file.png

 

 

20 REPLIES 20

In the tab, kindly add the filter as a priority to critical or high.

Hi Asifnoor,

If i add the filter then it will be applicable for all the types of change request ie standard,normal and emergency.

I wanted to display P1 and P2 incidents only for emergency change.

Try to create an 'Emergency Change' UI action. 

Then assemble your conditions to only make P1 and P2 incidents visible. 

If this helped at all dont hesitate to mark my reply helpful or correct. 🙂 good luck! 

Hi Pressley,

Could you please share the details like how can i write the UI action script.

As i am not much aware of UI action your help would be much appropriated.

 

My requirement is to display only P1 and P2  incident under the 

"Incidents pending change" related list of Emergency change.

Note i want this functionality to enable only for the emergency change request

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.