Field message disappearing when clicking on form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 05:11 AM
I've created the following client script to show a field message on a form:
When the form loads, it appears:
However, if I click on any part of the form, it disappears:
I was just wondering if someone could explain what I'm doing wrong and how I keep the field message appearing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 05:13 AM
please create an onChange client script and add the same message as well
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 05:22 AM
something like this
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
g_form.showFieldMsg();
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 06:09 AM
What would I have to select as the Field name?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 06:20 AM - edited 10-26-2023 06:21 AM
g_form.showFieldMsg('u_effort','Days-Hour-Minute-Seconds','info');
u_effort - Assuming the backend name of Effort field