make field mandatory before changing field values

hadron_collider
Tera Contributor

Hello,

 

 

What do I need to implement so that when the approver clicks "REJECT" the "reject reason" field becomes mandatory to fill in ? Once this field is not empty status is changed to "rejected"

 

kata90_0-1704708190418.png

 

5 REPLIES 5

Ivan Betev
Mega Sage
Mega Sage

Hello there,

 

I'd suggest you make a small popup that will be displayed when you press Reject, with a mandatory text field that you can save to "Reason To Reject" upon confirmation.

Something to read about: GlideDialogWindow: Advanced Popups Using UI Pages - ServiceNow Guru

 

Regards, Ivan

Ehab Pilloor
Mega Sage

Hi, 

You can implement UI policy with reverse if false (check box ticked) condition wherein if Status is rejected, Request reason is mandatory. 

If this answers your question, please mark this response as solution and helpful.

 

Thanks and regards,

Ehab Pilloor

piyushsain
Tera Guru
Tera Guru

Hi,

You can use g_form in UI action to check if the Reason field is empty or not and using gsftsubmit save the form only after it is filled

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain

but the UI Action itself, should it be marked as "Client" ?