Unable to invoke ArrayUtil script include from a scoped application?

Joe83
Kilo Contributor

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:

find_real_file.png

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

1 ACCEPTED SOLUTION

Hitoshi Ozawa
Giga Sage
Giga Sage

Try

var valid = new global.ArrayUtil().contains(existingVariables, 'testing');

View solution in original post

2 REPLIES 2

Hitoshi Ozawa
Giga Sage
Giga Sage

Try

var valid = new global.ArrayUtil().contains(existingVariables, 'testing');

Joe83
Kilo Contributor

Hi Hitoshi,

That worked! Thank you so much.

Johannes