In Output screen unable to see any script

neelamallik
Giga Contributor

var gr = new GlideRecord('incident');
gr.addEncodedQuery(
'sys_created_onONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday()'
);
gr.query();

 

Can anyone please tell me what is wrong with this script

8 REPLIES 8

Also you are only querying not leveraging the queried records so in database the records are only filtered out by your script..

I didn't understand can you explain more briefly 

K Sankalp
Tera Contributor

@neelamallik 

If  I am not correct you are not using output statements in script to log or print your results.
Try to use gs.print() or gs.log().


Best Regards
Sankalp

Ankur Bawiskar
Tera Patron

@neelamallik 

where are you using this script?

Are you sure your query is correct?

You can form your query using filter condition and then use Copy Query and then use it in encoded query

AnkurBawiskar_0-1768804409031.png

 

AnkurBawiskar_1-1768804427610.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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