Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Index outside the bounds of an array
#1
Not Solved
Ok, so right now I'm filling out a data grid in my application. I've done numerous grids only this particular one is giving me trouble. Normally if i get this error, its because I have defined a row outside of the rows available, but in this case even using the recording tool with hard values I run into problems.

So this is my code:

Code:
SwfWindow("MS ProContractorMX").SwfTable("BaseGridView_Proj_Invoice").SetCellData Invoice_PCMX_Row,"TotalQuantity",datatable("Invoice_Units_Rev_Quantity", dtGlobalsheet)

Where at this particular loop: Invoice_PCMX_Row = 0, and datatable("Invoice_Units_Rev_Quantity", dtGlobalsheet) = 10

however, even if I record to get hard values and get:

Code:
SwfWindow("MS ProContractorMX").SwfTable("BaseGridView_Proj_Invoice").SetCellData "0","TotalQuantity","10"

I still get the same error:

IG :
Code:
[SetCellData] : Index was outside the bounds of the array.
Function file: S:\JF_QTP_Main_Dir_Test\Startup_Scripts\PCMX.vbs
Line (3498): "".
BaseGridView_Proj_Invoice is my grid within my application and MS ProContractorMX is the application

Is there anyway I can ask which array its using? (I'm assuming its the Grid) I can provide more of my code if its required its just that its part of a large function.

Thanks for the help,
Jay
Reply
#2
Not Solved
Hi, maybe you should try to start from 1 instead of 0, or Check your column name by the index.

Try it and tell us,
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  click each web link in a page using Index or other method in QTP smeijer 13 24,725 04-29-2017, 04:53 PM
Last Post: kowshik
  Upgraded QTP 11.0 to UFT 11.53, Object Index Properties are varying Raghava M 0 2,184 01-28-2015, 06:02 PM
Last Post: Raghava M
  How to convert a single dimension array to two dimensional array venkatesh9032 3 5,541 02-10-2014, 03:07 PM
Last Post: pranikgarg
  General run error. Line (18): "Loop while Browser("Index:=0").Object.Busy" AshokReddy 3 5,077 12-20-2013, 01:44 PM
Last Post: sshukla12
  Unable to select a combo item by value or index martinshort 2 3,575 08-26-2013, 07:55 PM
Last Post: sudhirzpatil

Forum Jump:


Users browsing this thread: 3 Guest(s)