Chaitanya ILCR
Giga Patron

Hi @Snow Tomcal 

 

when using iterative array methods (e.g., forEach, map, filter), the this value inside the callback is usually undefined.

 

https://www.w3schools.com/js/js_this.asp 

can you try this instead.

assign the function definition to a variable outside the forEach loop and pass it as the second parameter to the forEach

var myFunc =  this.myFunction

groups.forEach(function(group){

allUsers = arrayUtil.concat(allUsers, myFunc(tableName, 'group' = group, variable));

},myFunc);

 

Regards,
Chaitanya

View solution in original post