Micro Focus QTP (UFT) Forums
Script running more times than the values 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Script running more times than the values in global data table (/Thread-Script-running-more-times-than-the-values-in-global-data-table)



Script running more times than the values in global data table - TPavani - 09-19-2012

hi...
In my script, i did parameterization and added some values in Global data table. Whan I run the script, it is running even though the values in Global data table are completed. It is taking some defalut values and running. I checked the 'Action Call Properties- Run'. It is selected as 'Run on All Rows'. Can you please tell me why the script is not stopping......


RE: Script running more times than the values in global data table - Ankesh - 09-24-2012

What is the test run setting??

Is it set to Run on all rows? Make sure you do that as u hv entered data in global datasheet.


RE: Script running more times than the values in global data table - krr - 09-26-2012

Pavani,

Settings are fine. You have to do two cross checks.
1. You should not have loop for reading of data from datatable. Like For i=1 to Rowcount
''' Execute statements
Next
2. You need to clear or delete all the data from the rows of datatable after your data rows.

Do above things and let me know how it goes.


RE: Script running more times than the values in global data table - Jyobtech - 09-28-2012

Hi KRR,
You said correctly..
@Pavani,
Please delete the empty rows from your datatable because some times you may enter some data below of the datarows and after that u may delete the same data in the datasheet because you may not required the data ...so better delete those rows inspite of delete data in that row..

Earlier I faced the same issue ..


you may forgot to delete rows inspite of delete data from the datatable..


RE: Script running more times than the values in global data table - srselva - 09-28-2012

Goto File->Settings->Run and make sure that "Run one iteration" radio button is seleted.Smile


RE: Script running more times than the values in global data table - krr - 10-04-2012

Hi Srselva,

I provided the solution assuming that setting will "Run On all rows".

@pavani
Let me know if you got the solution.