How to remove/hide state field choices in change request in list view?

Mounika Tungala
Mega Guru

Hi All,

 

I need to hide/remove the state field choices like Assess and Authorize for standard change requests in list view.

can anyone help me with this?

 

5 REPLIES 5

AnveshKumar M
Tera Sage
Tera Sage

Hi @Mounika Tungala 

It may not be possible to hide them, But you can use onCellEdit client script like the one below to prevent updates for these states from list view.

 

function onCellEdit(sysIDs, table, oldValues, newValue, callback) {

   var saveAndClose = true;

  if(newValue == -3 || new value == -4){

  alert('Not allowed');

  saveAndClose = false;

  } else {

  saveAndClose = true;

  }

callback(saveAndClose);

}

 

To make it prevented only for standard changes you need to create some client Callable Script Include to get the change type and apply the same logic.

Thanks,
Anvesh

Hi @AnveshKumar M 

I have tried this approach and have been able to restrict editing the field in the list layout but I need to hide the choices that are not required otherwise the users will be confused.

So I am looking for some alternative solution.

DanielCordick
Mega Patron
Mega Patron

Create a list_edit ACL on the table for the column, here’s a support doc 

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0743628

 

https://www.servicenow.com/community/itsm-forum/how-to-restricting-fields-in-list-view/td-p/721907

 

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response helped in any way 

Hi @DanielCordick 

There is an oob list_edit acl on the change table for state field. I have modified that as per my requirement. Along with that, I need to hide the choices for standard change requests.