Get array from script include through query business rule

Nagasri
Tera Expert

From a query business rule, we are calling a script include and returning a array of sysids through a function. I am unable to get that array in query business rule. Anyone please help me here.

4 REPLIES 4

Sandeep Rajput
Tera Patron
Tera Patron

@Nagasri Could you describe the issue you are facing with the example script. Are you getting an undefined value from the Script include? or are you getting a single sys id repeated across all the indexes in the array?

Please check the attached scenario which we are trying, we are getting object object in info message but not array.

@Nagasri Could you update you code as follows.

var stringArray = JSON.stringify(caseSysIds);
gs.addInfoMessage(stringArray);
return stringArray;

Hope this helps.

 

 

Aman Kumar S
Kilo Patron

Hi @Nagasri ,

Did you check if you are getting the logs mentioned in the script?

Is your code going inside the if statement itself?

I suspect the way you are comparing array could be failing.

 

Best Regards
Aman Kumar