Micro Focus QTP (UFT) Forums

Full Version: Different Amount for same iteration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I get different amount in the below function ? I wasn't to excute this function to run one time but it should loop twice and I could be able to get different amounts.





Public Function (RCategory,StrLogin,StrAmt)
 For iVal = 1 to 2
  Set RObj = Browser(" ").Page(" ").Frame(" ").WebTable(" ")
      RObj.ChildItem(Rcnt-2,6,"WebEdit",0).Set CCUR(StrAmt)
 Next
StrAmt = DataTable("Amount", dtGlobalSheet)
For iVal = 1 to 2
DataTable.SetCurrentRow(iVal)
Set RObj = Browser(" ").Page(" ").Frame(" ").WebTable(" ")
RObj.ChildItem(Rcnt-2,6,"WebEdit",0).Set StrAmt
Next