ContributionsMost RecentMost LikesSolutionsRe: DBTableVariableObj.Reset() not working as expected Interestingly, the Reset without brackets does not fail during the build or execution. It just silently pass. Nice catch! :) Re: DBTableVariableObj.Reset() not working as expected Oh man, this is an error in TC user guide then... I just copied it from there:D Of course, Reset() works just fine. No need to reset the original table variable. Re: DBTableVariableObj.Reset() not working as expected Hi rraghvani and thank you for the reply. The reset line you mentioned definitely helped! Thanks. But it's really weird :) I mean, at start of the function, there is created a new variabledbTable, which is filled from the function's parameter dbTableToRead. And then the while loop is performed on that new variable, not on the original parameter, containing the DBTable variable. And because there is no error thrown on dbTable.Reset; row, one would expect the initialization of the dbTable iterator was successful? I still think there is something wrong with the reset?:) Anyway, thank you for the solution. DBTableVariableObj.Reset() not working as expected Hi guys, I'm experiencing a weird problem with DBTableVariableObj.Reset(), which is supposed to reset the iterator back to the first row. Well, it seems it does not reset the iterator at all :) Here is a simple function to demonstrate the issue... //dbTableToRead is a DB Table variable diefined in keyword test //columnToRead is a name of column function testDBTableReset(dbTableToRead, columnToRead) { var targetWord, i=1; // Obtains a DB Table variable var dbTable = dbTableToRead; // Initializes the iterator dbTable.Reset; Log.Message("Iteration - Start"); // Iterate through rows while(!dbTable.IsEOF()) { targetWord = dbTable.Value(columnToRead); Log.Message("Row number: " + i.toString() + " Value: " + targetWord); // Forward the iterator to the next row dbTable.Next(); i++ } Log.Message("Iteration - End"); } Basically, it should iterate over the items in DB Table variable and write them to log. I'm calling this function two times in the same keyword test... And here is the result: Basically, the second run of the function jumps over the while(!dbTable.IsEOF()) block, as if the dbTable is not reset? But it should be or am I doing something wrong? It seems it's not possible to attach the sample project here, so if you are interested, you can get it here (zipped and inspected for viruses): https://drive.google.com/file/d/1TiRh50vKP6mguNRgvT13-vnyL-eP8rp1/view?usp=sharing Thank you in advance for any suggestion. SolvedDBTableVariable - add missing RowCount and Item properties Hi, While working with the DBTableVariable, I found that there are missing two quite useful properties, namely Item and RowCount, which are available in simple TableVariable. The RowCount is useful, if someone does not want to loop entire table withwhile and IsEOF. And Item is useful in case, someone wants to get the value from particular row/column, using index values. Thanks. Re: (JavaScript) Unable to get value(s) from TableVariable passed to a function The Watch is definitely a useful tool and I can't imagine debugging problems without it. But this time, I would most probably not realize the cause of the problem myself. I'm still too inexperienced with the TC and what it actually shows in the watch. BTW, I just used the proper DB Table code and after loading DB Table to the variable, it shows just ColumnCount in the Watch and nothing else. But this time, Reset worked as expected and I was able to extract all available data :) In fact, the original code works with the DB Table as well. It just required removing the Iterator Property and that was it. I think it would be good to unify the Table and DB Table properties and methods. Re: (JavaScript) Unable to get value(s) from TableVariable passed to a function Thank you for your hint! I found the cause of the problem. The variable I created was DB Table, using CSV file and it's not compatible with the above code. Silly me :) The sample code from this page works as expected: https://support.smartbear.com/testcomplete/docs/reference/program-objects/dbtablevar Re: (JavaScript) Unable to get value(s) from TableVariable passed to a function MyVar contains Table variable, defined in Keyword test. If you check the second screenshot, you can see it shows ColumnCount=1 so the MyVar appears to by correctly filled with Table object. The problem is, that MyVar.Iterator returns "nothing". But according to the user guide, Iterator property should returnIterator object, which provides a scripting interface to rows of the array. Re: Test Complete - checking if license available Hi, there is already a feature request for this, sadly, it got too little votes so far... Query License server for license availability | SmartBear Community I too would like to see this feature. I'm coming from a Ranorex world, where we can do an easy check of available license and eventually wait for next available license. It's tremendously helpful in case of multiple test projects running in CI environment. (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 theIterator 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? Solved