Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Matching values
#1
Not Solved Question 
I have two For loop, first For loop does is creates a customer and input the customer info and then the second for loop within the first for loop does the follows which is capture the customer name and verify the with the data within the datatable. The problem I am coming across is that when it goes through the second time creating another customer and then verify the second customer then it creates the following during runtime. The Customer1 disappears during runtime, I want it to go through each row and match the one that is True match. The results it gives me is true and false for each customer created. Like the example below is will say pass for Customer2 match but fail for Customer 2 matching with Customer1 which I don't want to see. Any help will be greatly appreciate.

Code:
Customer   Customer_from_Apps
Customer1  Customer 2        
Customer2  Customer 2

Temp_Value = DataTable.GlobalSheet.AddParameter("Customer_from_Apps", "")
For Loop Creating customer info

Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244
runtimevalue =  .VbTreeView("vbname:=AppServerTree").GetROProperty("Selection")
row=datatable.getsheet("Global").GetRowCount
For x=1 to row
datatable.SetCurrentRow(x)

Data_Val=Datatable.Value("Customer",dtGlobalSheet)
Datatable.Value("Customer_from_Apps",dtGlobalSheet) = runtimevalue
If (trim(Customer_Val)=trim(Data_Val)) Then
   Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value:   " &Data_Val&vbcrlf&  "Customer  Value:  " &Customer_Val
  else
    Reporter.ReportEvent micFail, "Cusotmer validation unsuccessful", "Actual Value:  " &Data_Val&vbcrlf&  "Customer Value:  " &Customer_Val
End If    
Next
nEXT
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to compare local sheet values with run time data table values? test71 2 8,445 03-14-2008, 07:09 PM
Last Post: test71

Forum Jump:


Users browsing this thread: 1 Guest(s)