The CreatorCon Call for Content is officially open! Get started here.

I created an script inc to get data from a table in a report, but seems this include is inefficient

Erlan01
Tera Expert

Hello everybody.
I created an include script to get data from the sys_uyser_grmember table into a report, however apparently this include is inefficient, and taking a long time to load the data, which is causing servicenow to not load my report. I would like your help to know if there is anything I can do in my code to help make my report load faster and more efficient?

 

here is the include lascoedynamicfiltersscriptinclude.png

And this is how my report is appearing to me due the loading being to slow

howthereportis.png
I Cannot even edit the report editNotable.png

1 REPLY 1

sasi_v
Tera Guru

 

Hello @Erlan01 ,
Have you run the script in the background? If not, try running it in the background while keeping some logs.

Convert sys_id to string at line 36 by using userMember.push(grMember.sys_id.toString()). Additionally, the userMember variable is of type Array; I'm not sure why you're splitting it into string again by using ',' character. Instead just return userMember.

 

Regards,

Sasikanth

If my solution addresses your issue , Please mark it as Helpful