The following mandatory fields are not filled in:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2017 08:37 AM
Hi community,
I want to set focus on the mandatory field if it is not filled by the user after click on Save/Update button,
Please find the snapshot below,
Here I just want to focus the Resolution Code if it is not filled by the user.
Like that the focus should be set on the first mandatory field based on the error message.
How to do that?
Please help me.
Thanks,
AnnBel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2017 12:25 AM
Are these messages being created by mandatory fields defined on State Flow records? I can't think of anything else that provides this particular .... ummm... unique... user experience.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2017 01:35 AM
Hi Anna,
See t_anurag ' s answer here: Set field focus from validation script
This is a client script code that you can employ only if you know which field is not populated.
In that case, you can try
var fieldToFocus = g_form.getControl(field);
fieldToFocus.focus();
return false;
but I am not sure how to implement in your case.
harel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2017 02:20 AM
Thank you harel ben-sheffer,
Yeah, I can use this code, but I need to know that the exact place where these error messages are written.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2017 02:51 AM
Hello Anna,
The messages you see in red, in regards to the Mandatory fields that are not filled in, are coming from UI Policies.
If you go to the Additional (Hamburger) action button, presented at the top left of the form and navigate to Configure > UI Policies -> you will be able to see a list of all UI Policies that run on the table of the specified record.
By default, the SNOW system ensures such message will be created for each Mandatory field configure in a form.
What is the exact requirement of yours? You want to change the text of the message?
Best Regards,
Georgi Mavrodiev
IT Consultant
Do IT Wise
You may visit us in our Web Site: www.doitwise.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2017 03:03 AM
Thank you for your valuable time.
Yeah, In an incident form I've created a new UI action button to resolve the incident, there I can set the focus on the close_code whenever an incident is resolved with empty close code.
While manually resolving the incident I am getting the error message mentioned above,so I thought of including the same in that place like whenever the incident is resolved with empty mandatory field I just want to focus the first mandatory field within the form.