Scheduled report execution ignoring conditions in scoped application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 04:03 AM
var test= false;
var number = new GlideAggregate('table");
number.addEncodedQuery('sys_created_on>=javascript:gs.beginning0fToday^sys_created_on<=javascript:gs.endofToday()');
number. addAggregate ('COUNT");
number.query();
if(number.getAggregate ('COUNT' )== null| | number.getAggregate('COUNT')== 0)
{
test=true;
answer= test;
this script inside condition in scheduled report. It is working in global scope but in its not working in scoped application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 04:24 AM
Hi @gurushankar ,
There is no restrictions for GlideAggregate in scoped app it will work, check the table in which scope and your running script form same scope. Try below script .
var test= false;
var number = new GlideAggregate('table");
number.addEncodedQuery('sys_created_on>=javascript:gs.beginning0fToday^sys_created_on<=javascript:gs.endofToday()');
number. addAggregate ('COUNT");
number.query();
var count=number.getAggregate ('COUNT' );
if(ncount == null | | count == 0)
test=true;
{
answer= test;
If my response helped, please mark it as the accepted solution ✅ and give a thumbs up👍.
Thanks,
Anand