Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Script include not being called from module filter

Farah5
Tera Contributor

Hey guys, I have a module where I'm calling a script include (client callable is checked), however it doesn't seem like the script is being called. The module is in a scoped application while the script include is global. I know the script include works because I have tested it in Background scripts. I've tried so many different ways of calling the script include, but nothing seems to be working. 

 

Here is the module filter: 

Farah5_0-1680811476040.png

 

And here is the script include. The gs.info on line 33 isn't even logging, so it seems like the script include is being called at all. 

Farah5_1-1680811576017.png

Any help is appreciate. Thanks

9 REPLIES 9

sleepycrown
Giga Guru

Hi,

 

Are the script include and function names the same? 

Yes they are

Got it. When you test this in background scripts, do you get a single string back on 

return controlObjectives;

or does it/can it return multiple sys_ids?

It's returned as an array of strings.

 

In this screenshot I logged controlObjectives, and then I logged typeof controlObjectives[0]

Farah5_0-1680815055102.png