Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Repeat iterations Until New Value Is Seen in Column1
#1
Solved: 6 Years, 5 Months, 2 Weeks ago
Hello,

I'm importing an excel that has 2 columns (Column A and Column B). 
I'm trying to put a logic for my UFT script to repeat iterations by taking values from Column B until the value in column A changes.

Loop condition: Take value from Column A
   Repeat iterations by taking values from Column B until the value in column A changes.
End Loop

Part of script
1. Login to a specific location by taking the value from column A
2. Repeat steps for n number of rows in column B until value in column A changes

column A, Column B
001, 2001
001, 2002
001, 2003
001, 2004
002, 2001
002, 2005
002, 2006
003, 2002
004, 2004
004, 2005
004, 2006
Thanks in advance. Appreciate your help in this matter. 

Regards,
Shayk
Reply
#2
Solved: 6 Years, 5 Months, 2 Weeks ago
First , please refrain from posting duplicate questions on the forums. We have deleted the first question this time.

Here is the algo you can try -

  1. Start the loop for ColA
  2. Store the value of column A in a variable say strColA
  3. Start a loop for ColB
  4. Compare the strColA for the current values of ColA, say tempColA on every iteration. 
  5. As soon as strColA is not equal to tempColA, exit the ColB loop.
  6. Now your loop of ColA will repeat 1-5 till it process each row for ColA.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT Datatable iterations Studymode 2 3,823 12-12-2017, 11:10 PM
Last Post: Studymode
  QTP-Re-executing script after completion of all iterations JwalantBhatt0602 1 2,713 03-24-2016, 12:37 AM
Last Post: JwalantBhatt0602
Question QTP not performing iterations based on local data sheet Breaker 18 56,956 01-25-2016, 04:32 PM
Last Post: arunshuklainbox
  How To use iterations for API petchd 1 2,839 12-03-2015, 06:51 PM
Last Post: petchd
  this code show error after some iterations excellentpawan 2 3,029 06-18-2013, 03:05 PM
Last Post: learnQtptips

Forum Jump:


Users browsing this thread: 1 Guest(s)