Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

If i entered 2 columns and 4 rows inputs in DDT Like Mango
fruit, Banana Fruit, Brinjal Veget, Carrot Veget.. . My Q
is How to get the 2nd column value for corresponding 1
column input in 3rd row ie, ( i need to get "veget" in
messge box @ run time

Answers were Sorted based on User's Feedback

If i entered 2 columns and 4 rows inputs in DDT Like Mango fruit, Banana Fruit, Brinjal Veget, Car..

strCnt=DataTable.getRowsCount
For i=1 to strCnt
datatable.SetCurrentRow(i)
x=datatable.Value("A")
datatable("c")=x
Next

 Is This Answer Correct ? 4 Yes 0 No

If i entered 2 columns and 4 rows inputs in DDT Like Mango fruit, Banana Fruit, Brinjal Veget, Car..

datatable.setcurrentrow(3)

x=datatable.value(2,1)

'datatable.value(2,1) where 2 is column name and 1 is sheet
no. ie., 1 is for global sheet

msgbox x

'output is veget

 Is This Answer Correct ? 2 Yes 0 No

If i entered 2 columns and 4 rows inputs in DDT Like Mango fruit, Banana Fruit, Brinjal Veget, Car..

datatable.SetCurrentRow(3)
x=datatable.Value("A",1)
msgbox x
datatable.Value("c",1)=x
msgbox c

--------------------------------------
A c
mango
banana
brinjal
carrot

 Is This Answer Correct ? 5 Yes 5 No

If i entered 2 columns and 4 rows inputs in DDT Like Mango fruit, Banana Fruit, Brinjal Veget, Car..

 Is This Answer Correct ? 0 Yes 0 No

If i entered 2 columns and 4 rows inputs in DDT Like Mango fruit, Banana Fruit, Brinjal Veget, Car..

i= inputbox "enter ur string" # say brinjal

r=datatable.getrowcount #get row count
for i=1 to r #loop till the end of the row
datatable.setcurrentrow(i)
aa=datatable.(a ,dtglobalsheet) # column 1 value into aa
if instr(aa,i,1)=1 #compare the strings
bb=datatable(b,dtglobalsheet)
msgbox bb
exit
else
i=i+1
next

 Is This Answer Correct ? 0 Yes 1 No

More QTP Interview Questions

In a webtable,a list of values are there,rightnow one values shows,later random another values shows,but how to retrieve the random value in webtable.

Hi All, I need code for how to execute qtp scripts from excell sheet

Local Obj Repository and SOR are editable know, y we have to edit those.. i mean in which situation we need to edit those and how to do..? pls help me..

When ‘option explicit’ keyword is used in qtp?

Plz Explain How to access Or Store Script from VSS? Explain Real time work (qtp) where you store folders and next to how to you access that folders and how you maintain folders in VSS ? What are the Menu's in VSS? Suppose in Manual, by using Checkin Checkout u can access documents. how you access in QTp REal time?

I have qtp 9.5 demo ver,I am not able to record the yahoo broeser.so anyone can tell me what setting i have to do in QTP for yahoo brower recording. why its not recognise the object of yahoo browser????

How to handle Dynamic Arrays?

What will be the script for recovery scenerio.plzanyone give ans with aexample related to banking project

Differentiate the two Object Repository Types of QTP.

how will you handle the situation when object is not caputred during record?

Whats the realtime QTP testing process

How i can use and create Library functions in QTP and what is the proces .

Categories