The CreatorCon Call for Content is officially open! Get started here.

How to remove the "Canceled" State Choice from the list view in the incident table

kandulek
Tera Contributor

Hi All,

 

How to remove the "Canceled" State Choice from the list view in the incident table:

kandulek_2-1761064070333.png

 

 

This choice has already been removed from the Selected slushbucket and doesn't appear on the form but still appears in the list view...

 

kandulek_1-1761063801274.png

 

This Choice is inactive:

kandulek_0-1761065070586.png

 

 

Thank you in advance for your suggestions on what else could I check.

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@kandulek 

I believe even if you inactivate that choice, it would still be available for selection in the filter condition.

that's OOTB behavior.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

NavinAgarwal
Kilo Guru

Hi @kandulek ,

 

You can use below onCellEdit client script, this will allow any change from list view except cancel.

 

Field Name: State

function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
  var saveAndClose = true;
 //Type appropriate comment here, and begin script below, you need to replace 8 with value of cancel you have in your instance
 if(newValue == '8'){
    alert("You cannot change this status from the list view"),
    saveAndClose = false;}
 }
 callback(saveAndClose); 

 

If you found my response helpful, could you please mark it as ‘Accept as Solution’ and ‘Helpful’? This small action goes a long way in helping other community members find the right answers more easily and supports the community.