Forum Discussion

hina's avatar
hina
Contributor
10 months ago
Solved

Length of Array is returned as undefined

Hi, For the code below, the length of Array is returned undefined, even though the Array is not empty. I have tried using both "length" and "Count" to get the length of Array but it is returning und...
  • rraghvani's avatar
    10 months ago

    I haven't tested the code, but could you replace the code with this, to see if it logs the length of ListJob.

    var ListJob = AppProcess["FindAllChildren"](ArrProps,ArrVals,1000);
    
    // Replace the above with this
    
    var ListJob = AppProcess["FindAllChildren"](ArrProps, ArrVals, 1000)["toArray"]();
    Log["Message"]("Total number of ListJob: " + ListJob["length"]);