Hi Everyone,
I am trying to call the forEach(myFunction) {
}
But I keep getting this error: : TypeError: Cannot find function forEach in object com.thingworx.types.InfoTable@e5e813bf.
Is this a version issue?
Please assist me with this
Many Thanks,
Solved! Go to Solution.
Try with following,
var infoTable = [INFOTABLE DATA];
infoTable.rows.forEach(myFunction);
Try with following,
var infoTable = [INFOTABLE DATA];
infoTable.rows.forEach(myFunction);
Hello,
To extend on @Sathishkumar_C's answer:
This error indicates that you are trying to use the forEach function on an object which doesn't contain this function.
My experience is that it is mainly used on arrays, and if you are trying to use it on an infotable, the array is called "rows" as explained in Kumars post.
It does however seem to be possible to use it on objects, it is just not commonly used.
Regards,
Jens