We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Check whether additional comment is not empty

Not applicable

Hi Experts,

What could the best method to check if additional comment is not empty in a background and business rule.

@Ankur Bawiskar 

var gr = new GlideRecord('incident');
gr.get('b64f102567f551101a1136dbd36d434d');
gs.print(gr.number);

gs.print(JSUtil.nil(gr.comments));

//gs.nil()

based upon which i wish to call an api. Please help.

 

Thanks in advance.

11 REPLIES 11

Not applicable

Actually i am always using it on current.comments only. Thanks for the above info.

Hi,

then why not use business rule which is after update

In condition check Comments [IS NOT EMPTY]

Script: your logic

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader