How can we select a single particular value in a row of datatable when that particular row is having many values using QTP?

Kishan Dev Singh's picture

How can we select a single particular value in a row of datatable when that particular row is having many values using QTP?

A row of datatable is having many values amongst which one value needs to be selected and prcessed to next step.How can we do that using QTP?

1 Answer

Raveen R's picture
Raveen R replied on June 20, 2014 - 8:22am.

For selecting the values from data table follow the below steps:

1. Set the current row from which you need to get the value using the statement - DataTable.SetCurrentRow(<enter the current row value>)

2. Get the column dfrom which you need the value using the statement - DataTable.Value("<Column Name">,"<Sheet Name>")

For Example:- If you need the value from the Column Name "Test" and the row number 5 in the sheet named "Global", Use the below code:

DataTable.SetCurrentRow(5)

DataTable.Value("Test","Global")

Using this statement you will get the value from 5th row in the column named Test.

 

I assumes this helps you!!

StickyMinds is a TechWell community.

Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.