list view error message based on field value

surbhi_123
Tera Expert

Is it possible to show error pop up on a field which is dependent on other field in list view

3 REPLIES 3

Mayur2109
Kilo Sage
Kilo Sage

Hi @surbhi_123 ,

 

Create onCellEdit client script on which you will be changing value & using g_form.getValue(), get the value of dependent field & show error message as per your requirement.

For more understanding refer below video that will solve your doubts.

https://www.youtube.com/watch?v=9JNZr0MwlIM 

 

Please check and Mark Helpful and Correct if it really helps you.

Regards,
Mayur Shardul

I have 2 fields State and state substaus, the case is that when state value is set as 'Pending' then state substatus field becomes mandatory. But if someone updates the state field in list view then how can I make the form submission not to be done

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @surbhi_123 ,

 

You will have to either create the script include or Display BR to check the dependent field value condition in server side because on the list view you have option to create onCellEdit client script but g_form will not work on onCellEdit script. So better to pass the sys_id from OnCellEdit client script to server side and then check the required conditions.


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy