Text box should start with '_'
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2016 04:57 AM
Hi All,
I have a requirement of placing a validation in the text box,
It should start with '_A' , If not it should throw as error
16 REPLIES 16
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2016 04:41 AM
Not an issue for me
Thanks
Ankur
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2016 06:41 AM
if (newValue.indexOf('_A') != 0 && g_form.getValue('u_impacted_users') != '')
{
alert("It should start with an underscore _A");
g_form.setValue('u_impacted_users', '');
}
Careful about using g_form.setValue() on an onChange script. It'll run into an infinite loop.