Hello, everyone! Using the Generate Data option, I created a table (12x2000) but I receive an exception (A row index must be an integer value) every time I attempt to use any of it. In doing some...
You get this message after you click Finish from the Data Generator Wizard?
Or when you attempt to use the table variable in your scripts? I would start by checking to see how your project variable was saved (is the Type = Table or DB Table? is there data in the table?):
and if you wanted to extract random data from this generated table you could do so by referencing this [TestComplete guide] - Here is an example of how you might return a random phone number from your table:
function test() {
var value;
var randoRowNum = getRandomInteger(1, 2000);
var randoPhoneNum = ProjectSuite.Variables.Var1.Item(9, randoRowNum);
Log.Message("random row = " + randoRowNum + " | random phone number = " + randoPhoneNum);
}
function getRandomInteger(min, max) {
var intMin = min;
var intMax = max;
if (equal(intMin, null) && equal(intMin, null)) {
intMin = 1;
intMax = 10;
}
return Math.round(Math.random()*(intMax-intMin)+intMin);
}
and here is the log returning the value from a random row in column 9 (phone#):