GetPrivateData Iteration
Posted: Thu Mar 07, 2019 2:49 am
I am trying to iterate through the collection/array and get the values that comes back from the getPrivateDataTags on the Job object using VbScript. I'm running into an issue. Whatever I do, I cannot iterate through the collection or get any values from the collection that comes back. I have tried multiple different methods to get the value from the returned array but no go. Any help here would be greatly appreciated.
datatags = job.getPrivateDataTags()
Call job.Log(MESSAGELEVEL_DEBUG, TypeName(datatags)) 'This works. String() is the response
Call job.Log(MESSAGELEVEL_DEBUG, Ubound(datatags)) 'This works. 6 is the response
Call job.Log(MESSAGELEVEL_DEBUG, CStr(datatags(1))) 'Doesn't work
for index = 0 to ubound(datatags)
Call job.Log(MESSAGELEVEL_DEBUG, CStr(datatags.Item(index))) 'Doesn't work
Next
datatags = job.getPrivateDataTags()
Call job.Log(MESSAGELEVEL_DEBUG, TypeName(datatags)) 'This works. String() is the response
Call job.Log(MESSAGELEVEL_DEBUG, Ubound(datatags)) 'This works. 6 is the response
Call job.Log(MESSAGELEVEL_DEBUG, CStr(datatags(1))) 'Doesn't work
for index = 0 to ubound(datatags)
Call job.Log(MESSAGELEVEL_DEBUG, CStr(datatags.Item(index))) 'Doesn't work
Next