(JavaScript) Unable to get value(s) from TableVariable passed to a function
Hi folks,
I want to pass a Table Variable to my custom function and obtain value from defined row number and column name.
At first, I tried to follow the sample code from TC User Guide:
https://support.smartbear.com/testcomplete/docs/reference/program-objects/tablevariable/index.html
But the sample fails at Iterator.Reset(); line with "cannot read property" error...
But the problem seems to be at previous line MyIterator = MyVar.Iterator; which does not return Iterator object, although the MyVar successfully loads Table variable "steps".
I also renamed the Iterator variable to MyIterator, just to make sure it does not interfere with Iterator property, but no luck either.
Does anyone have an idea what's wrong? Is there something missing, the sample code is obsolete or I found a bug? Thank you in advance.
BTW, is there a way to get the value from table variable via column name/row index?
MyVar is an Object, that just contains ColumnCount and nothing else. It should also contain TableVariable Object Properties. This is the reason why Reset fails, as there's no Iterator.
You need to check this,
to ensure it's returning the correct object type.