Mandatory fields check in list view

Tina24
Giga Guru

In the incident we have set some mandatory fields, it will check the fields filled or not , if not will popup the message.

Tina24_0-1701326660904.png

 

But in list view update status to Closed or Resolved not apply the rules, no alert message for need filled the mandatory fields, and status value can be set directly.

Tina24_0-1701329228804.png

 

As required when ticket change to Closed or Resolved they need get the same alert message.

 

Any ideas for this control in list view ? Thanks!

1 ACCEPTED SOLUTION

dhanu3
Kilo Sage

@Tina24 

Use OnCelledit client script as below and add your conditions as required in if statement,

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

 

    var saveAndClose = true;



  if(newValue == 7){

 

  alert('Please fill mandatory details');

 

  saveAndClose = false;

 

  } else {

 

  saveAndClose = true;

 

  }



callback(saveAndClose);

 

}

View solution in original post

3 REPLIES 3

Community Alums
Not applicable

Hi @Tina24 ,

UI Policies have 2 types - onload and onchange. Hence it will not working in list view.

Client script have 4 types - onload, onchange, oncell edit, onsubmit.

you can write on cell edit client script for your business requirements.

dhanu3
Kilo Sage

@Tina24 

Use OnCelledit client script as below and add your conditions as required in if statement,

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

 

    var saveAndClose = true;



  if(newValue == 7){

 

  alert('Please fill mandatory details');

 

  saveAndClose = false;

 

  } else {

 

  saveAndClose = true;

 

  }



callback(saveAndClose);

 

}

Why is this the "accepted solution" when it does not even cover the question asked about other required fields?