Micro Focus QTP (UFT) Forums
array or variable need help urgent - 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: array or variable need help urgent (/Thread-array-or-variable-need-help-urgent)



array or variable need help urgent - raydgeek - 03-22-2011

Hi All
i m newbie in QTP
need help
Well m trying to get all the data from a webtable & i need to compare it with the same table if condition satisfy need to log it.

here s my piece of code that i tried.
right now m getting it through GetCellData func & putting it in a msgbox
but i guess need to store it in n array or variable & compare

Code:
i = Browser("xx").Page("xx").Frame("detailDialog-iframe").WebTable("y").RowCount
        For a = 1 to i
          j = Browser("xx").Page("xxl").Frame("detailDialog-iframe").WebTable("y").ColumnCount(i)
          For x = 1 to j step 2
        b = Browser("xx").Page("xx").Frame("detailDialog-iframe").WebTable("y").GetCellData(a,x)
msgbox b
Next
Next


I will b very thankful if nybody can help me with this


RE: array or variable need help urgent - basanth27 - 03-23-2011

b is your variable. What you need is to use a if then end if to check if it reaches the valid condition.