- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2020 04:03 PM
Hi ServiceNow Community Developers,
It looks like the ArrayUtil script include cannot be called from a scoped application. Is that by design or am I doing something wrong? This is what happened - i have code that calls it as follows:
The script execution does not go pass beyond line 36 which is where I invoke the ArrayUtil. I know that because I can't see the results of the gs.info() in the logs and I also can't see all my logs after line 36. If I comment out the part of the code where I invoke the ArrayUtil the code executes properly all the way to the end of the script. The system does not throw any error so I can't tell what it is I am doing wrong.
Would you guys please advise.
Thanks,
John
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2020 04:11 PM
Try
var valid = new global.ArrayUtil().contains(existingVariables, 'testing');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2020 04:11 PM
Try
var valid = new global.ArrayUtil().contains(existingVariables, 'testing');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2020 04:18 PM
Hi Hitoshi,
That worked! Thank you so much.
Johannes