12-28-2010, 09:55 PM
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:
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:
I still get the same error:
IG :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
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): "".
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