Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can v save random numbers in a table
#1
Solved: 10 Years, 7 Months, 3 Weeks ago
Hi,

Can any one please tell me, how to save the random numbers in a runtime data table.

Is it possible to do so??

My sample program is,
Code:
For i = 1 to 10
    var = RandomNumber(0,50)
    msgbox var,,RandomNumbers_are
Next

in a message box a random number will be displayed.

Randomnumbers can be viewed in results window, if the action is reusable.
My doubt is, when action is not reusable one, how to save those values? if so, how to do that....

Thanks in Advance.
Srivani
Reply
#2
Solved: 10 Years, 7 Months, 3 Weeks ago
I assume random_no is the column name...so here is the code

Code:
For i = 1 to 10
var = RandomNumber(0,50)
[b]Datatable.Value("random_no") = var[/b]
msgbox var,,RandomNumbers_are
Next
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to click the save button in Save As window while downloading from SAP kathirvelnagaraj 0 2,282 08-25-2015, 07:37 PM
Last Post: kathirvelnagaraj
  Error in getting sum of numbers program QTpier 2 2,792 07-18-2014, 01:53 PM
Last Post: QTpier
  VB Script - random string qtp_user22 5 25,926 06-19-2014, 04:54 PM
Last Post: roysam404
  Save File1.xls as Text File1.txt with save as type - Text(Tab Delimited) Rupesh Singh 0 2,389 03-13-2013, 09:54 AM
Last Post: Rupesh Singh
  How to increase numbers for value in Excel Jyobtech 2 3,339 10-26-2012, 04:56 PM
Last Post: Jyobtech

Forum Jump:


Users browsing this thread: 1 Guest(s)