Micro Focus QTP (UFT) Forums
About Data Table - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: About Data Table (/Thread-About-Data-Table)



About Data Table - rajaselvan.d - 02-25-2008

Hi

i am using the script to create one parameter in runtime data table
Code:
DataTable.Addsheet("MYsheet").Addparameter("Arrival","London")
My question is : how to add the second value with same parameter.

First value is : London
Second value is : Paris (how to add with same parameter)


RE: About Data Table - Ankur - 02-25-2008

Second value will be created in second iteration right? so you need to set the row( Datatable.SetNextRow) to the second one and then add the value.


RE: About Data Table - rajaselvan.d - 02-25-2008

Hi Ankur

Can you tell me the script to add tha second value with same parameter in datatable?


RE: About Data Table - aksv18 - 02-25-2008

Hi Raj,

Try using this code

Code:
Datatable.SetNextRow
DataTable.GetSheet ("MySheet").AddParameter "Arrival, London", "8:00"



RE: About Data Table - newqtp - 02-26-2008

Hi Raj,

Try this code.I've used SetNextRow property but it's not setting cursor to next row then i've used setcurrentrow property.Here is the code ,Can anyone tell me where i'm doing wrong?

Code:
p=datatable.AddSheet ("My").AddParameter("city","New York")

i=datatable.GetSheet ("My").getcurrentrow
msgbox i 'This will give 1 as the current row is 1.

q=datatable.GetSheet ("My").SetNextRow 'This one is getting null value.It should show 2
'but nothing
msgbox q

datatable.getsheet("My").Setcurrentrow(2) 'then i've used this cuz i know my current
'row index is 2

datatable.Value("city",3)="bombay"

Thanks to all for there help.


RE: About Data Table - rajaselvan.d - 03-11-2008

Hi newqtp
Thankyou for your information. My problem is solved.