In MethodA I have the following code. The first array is PKs, the second is a text string, typically something like “L1,L2,L3”.
var comArray = databaseManager.getFoundSetDataProviderAsArray(foundset,'company_id');
var keys = new Array(globals.gtext);
forms.catitemUtility.MethodB(comArray, keys);
Here’s MethodB’s code:
var comArray = arguments[0];
var comArrayLength = comArray.length;
application.output('comArray = ' + comArray)
// returns in the form of [1,2,3]
application.output('comArrayLength = ' + comArrayLength);
// returns the correct number of array elements.
var keys = arguments[1];
var keysLength = keys.length;
application.output('keys = ' + keys)
// returns in the form of "L1,L2,L3", NO square brackets
application.output('keyLength = ' + keyLength);
// ALWAYS returns "1.0", the INCORRECT number of elements
I don’t understand why the “keys” array (if it is indeed an array) is behaving differently from the comArray of integer PKs. I need to loop through the elements of the “keys” array.