Jump to content

Retrieving data from an array?


Recommended Posts

I am unclear why I am not able to get data out of this array:

$oTable = _IETableGetCollection($oServiceEditFrame, "21") 
    $aTableData = _IETableWriteToArray($oTable, True)
    _ArrayDisplay($aTableData)

; This code does not work
    Local $PolicyTerm = $aTableData[0][7]
    MsgBox(0,"Policy Term",$PolicyTerm)

The error is:

(76) : ==> Subscript used with non-Array variable.:
Local $PolicyTerm = $aTableData[0][7]
Local $PolicyTerm = $aTableData^ ERROR

I am assuming that I am missing something very simple. Maybe additional eyes can help.

post-81218-0-91999600-1375817129_thumb.p

Link to comment
Share on other sites

hi ckelsoe

try to invert the array indexes:

Local $PolicyTerm = $aTableData[7][0]

edit:

sorry, I think is not that case

Edited by Pincopanco

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

a question:

between

     _ArrayDisplay ($ ATableData)

and

, This code does not work
     Local PolicyTerm $ = $ aTableData [0] [7]


is there more code (omitted here)  or it is exactly like that?

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

What does each of:

UBound($aTableData)

UBound($aTableData, 1)

UBound($aTableData, 2)

return?

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Well I am not sure what to think. I reran the code this morning - and it worked as expected with the results I wanted to achieve. I am not sure what the issue was last night. Anyhow thank you for the responses.

Pincopanco, the code is exactly as shown. Before and after is the code to get to the table, put the data in the array, and process the value in $PolicyDate once I had that to work with.

 
Link to comment
Share on other sites

 

Well I am not sure what to think. I reran the code this morning - and it worked as expected with the results I wanted to achieve. I am not sure what the issue was last night.

 

 

:wacko:perhaps a paranormal phenomenon . . .

. . . .  All's Well That Ends Well :P . . .

bye

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...