- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2016 01:16 AM
How to check any particular field of a form is empty by a business rule or script?
example:
if (current.name == ' ')
gs.log('Please enter value');
else
gs.log('Welcome' + current.name);
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2016 01:49 AM
Business Rule: if(current.name.nil())
Client Script: if(g_form.getValue('name'))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2016 01:49 AM
Business Rule: if(current.name.nil())
Client Script: if(g_form.getValue('name'))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2016 02:02 AM
Hi,
JSUtil - ServiceNow Wiki has a number of methods to help you check for null values in variables as well
Simon