Micro Focus QTP (UFT) Forums
How to increment the Index number of 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to increment the Index number of table. (/Thread-How-to-increment-the-Index-number-of-table)



How to increment the Index number of table. - branjitk - 07-06-2012

Hi all,
Good Afternoon.
I am having how to increment the index number for a web table.
i used following code, but it is showing only first table values.
for all table names are same.

Code:
If Browser("Browser").Page("Routings - SAS Cargo/Airfreigh").WebTable("From").Exist(50) Then
If Browser("Browser").Page("Routings - SAS Cargo/Airfreigh").WebTable("Flight").Exist(50) Then
        l = 6
Do Until Browser("Browser").Page("Routings - SAS Cargo/Airfreigh").WebTable("Flight").SetTOProperty("index", l)
Set Tblobj = Browser("Browser").Page("Routings - SAS Cargo/Airfreigh").WebTable("Flight")
     r_cnt = Tblobj.RowCount
            col = 2
        For i = 1 to r_cnt
            c_cnt = Tblobj.ColumnCount(i)
                         For j = 1 to c_cnt
                              a_celldata = Tblobj.GetCellData(i,j)
                             Next
                  Next
l = l + 1
Loop

Thanks & Regards,
Ranjit Kumar