cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Web Path - Collection 'out of scope'

john.hammond
Level 6
Afternoon all.

Bit of an odd one - currently trying to read from an element on a browser by dynamically shifting the web path.

Example of item 1:
/HTML[1]/BODY[1]/DIV[2]/DIV[2]/DIV[4]/DIV[1]/DIV[1]/DIV[1]

Example of item 2:
/HTML[1]/BODY[1]/DIV[2]/DIV[2]/DIV[4]/DIV[1]/DIV[1]/DIV[2]

So it's just the final DIV that needs to be amended. So, I've entered this into a parameter:
"/HTML[1]/BODY[1]/DIV[2]/DIV[2]/DIV[4]/DIV[1]/DIV[1]/DIV[" & [WarningRowCount] & "]"

With obviously WarningRowCount incrementing by one each time. This is set to be stored into [collection name.column 1].

However, I get this error message when running:
ERROR: Internal : Can't access collection [collection name - out of scope

I've been wracking my head with this for about half an hour now, any ideas?
3 REPLIES 3

John__Carter
Staff
Staff
As a sanity check, look at the visibility of the collection and whether it is local to your page or global. Check also that you don't have more than one collection with the same name.

john.hammond
Level 6
Potentially inelegant, but I decided instead to store to a text data item and then loop these into a collection. Seemed to resolve it, albeit in about 5 more additional steps!

IndrajeetRoy
Level 2
Hi John,

I had the same issue, discovered that we were using "[collection.Field]" in the Store Result part of a multi-calc stage. Removed the "[" and "]" and all worked fine.