make field mandatory before changing field values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 02:04 AM
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"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 03:03 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 03:12 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 03:29 AM
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
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 04:15 AM
but the UI Action itself, should it be marked as "Client" ?