ContributionsMost RecentMost LikesSolutionsRe: Trying to select a random value from a data source Hi So I'm 1st setting a variable of 'CurrentNumber' to get a random number with this line of code Math.floor(Math.random() * 100) + 1 Then I'm using the SetText operation with this command as a mode of Code Expression (which I'm assuming is the correct one to use?) to add the text from either a data table or excel spreadsheet that contains a list of names. I'm using the number variable 'CurrentNumber' to select the random name. Variables.Names("Name", KeywordTests.addEmployeePage.Variables.CurrentNumber) Hope this makes sense Thanks Ian Trying to select a random value from a data source Hi I'm running a test whereby I fill out a form that requires first name, last name, email address. I don't want a data loop as I'm only completing the form out once. I found this post which I thought was going to work. https://community.smartbear.com/t5/TestComplete-Questions/Picking-a-random-row-from-a-dataset-as-part-of-a-test/m-p/109287#M77536 However when executing the test it fails for the following reason 'Unable to evaluate the operation's "Text" parameter. Error: ReferenceError: Variables is not defined'. I've set my value in the test as per this post as a code expression Variables.Names("Name", KeywordTests.addEmployeePage.Variables.CurrentNumber) I'm new to TestComplete so not sure if I've done something wrong or its not possible to select a one off random value from a data source? Thanks Ian