Micro Focus QTP (UFT) Forums
How to control the rows in Global 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: How to control the rows in Global data table? (/Thread-How-to-control-the-rows-in-Global-data-table)



How to control the rows in Global data table? - Uma - 09-14-2011

Hi,
I have a 2 environment-Staging and production.I have 2 different username and password.I Parmeterized the values.
My Question is if I select staging it needs to use ROW 1 user id and password value and If I select Production it needs to use ROW 2 value?
How to select the particular row,by default it is selecting row 1.
Any Help?

Thanks,
Uma




RE: How to control the rows in Global data table? - vIns - 09-14-2011

Hi Uma,

DataTable.SetCurrentRow(i) ' i is the row number




RE: How to control the rows in Global data table? - SailajaKavi - 09-14-2011

we handled it in 2 different ways in two different projects.

one was to evry time change the variable to "Stag" or "prod" before execution in your batch file or in your global excel ,so based on that variable it will fetch the prodURL or STageURl, so all your prod and stage variables can be in the very first row of your data sheet

second way was more tedious , to maintain than execute ,we maintained two different sets with almost same scripts but different datsheet ,

first set contained details of Prod
second contained sTAG,

the folder structure and every thing was named accordingly and we use to run different folder for different environments



RE: How to control the rows in Global data table? - Uma - 09-16-2011

Thank you Sailaja.I am using the first method what you said.
Uma


Thank you for both of u.
Sailaja's first method is suitable for my condition.I used it.
Uma