Trigger a scheduled report based on the row count of the report

Manvi
Mega Contributor

Hi,

Need to schedule a report which is triggered only when the row count of the report is more than 3. The report is saved in SNOW on incident table with some filters on it. Please help.

Thanks

1 ACCEPTED SOLUTION

fmelard
Tera Expert

Hi Manvi,

 

You may use in the scheduled report the conditional script box, to avoid hardcoded query statements, you can address the ones from the report you're referencing in the setup.

Now you can run the execution periodically (as an example I set 1 min, please avoid that, 5 min should be sufficient):

 

find_real_file.png

 

Cheers

 

Francois

View solution in original post

3 REPLIES 3

fmelard
Tera Expert

Hi Manvi,

 

You may use in the scheduled report the conditional script box, to avoid hardcoded query statements, you can address the ones from the report you're referencing in the setup.

Now you can run the execution periodically (as an example I set 1 min, please avoid that, 5 min should be sufficient):

 

find_real_file.png

 

Cheers

 

Francois

Manvi
Mega Contributor

Thank you so much Francois. It worked!

Adam Stout
ServiceNow Employee
ServiceNow Employee

This is an interestingly simple and elegant solution, but rather than checking for changes every minute, can you look at triggering this off an event (like when an incident is created or assigned, check the limit?  It seems like there is an opportunity to improve and tune the process instead of just running a report which still requires someone to look at it and figure out what to do manually.

Does it need to be run every minute or is every hour (or every 15 minutes ok)?  You are running this query in the condition, so be conscious of the extra load on the instance.  One report won't matter, but if you have a thousand like this, perhaps it would.