How to check any particular field of a form is empty by a business rule or script?

Kaka Nayeem
Tera Guru

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);

1 ACCEPTED SOLUTION

Raju Koyagura
Tera Guru

Business Rule: if(current.name.nil())


Client Script: if(g_form.getValue('name'))


View solution in original post

2 REPLIES 2

Raju Koyagura
Tera Guru

Business Rule: if(current.name.nil())


Client Script: if(g_form.getValue('name'))


simonw
Tera Expert

Hi,



JSUtil - ServiceNow Wiki has a   number of methods to help you check for null values in variables as well



Simon