Ensemble - Action/Code not populating an array from a GetValueAt using a variable
Hi, I'm still very much new at Ensemble DTL. I am trying to set up an algorithm that requires loading fields from an OBX into an Array. I don't think that I know how to iterate through the OBXs. I know that there is a "for loop", that I will try to play with, but in the mean time, could someone tell me what is wrong with the following?
For example the code below works when I hard code the number 1 in OBXgrp(1)
set addarray(1) = source.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:ObservationValue(1)")
I get the value that I expect. However, when I run the code with the variable "index" in the OBXgrp below:
set index = 1
set addarray(1) = source.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp(index).OBX:ObservationValue(1)")
Nothing appears. How can I use variables in the source.GeValueAt? And by the way, what should I be calling this?
I realize that this may not be the best, slickest, way to do this. But since I don't understand the many nuances of Objectscript and DTL just yet, I'd like to stick to code that I can comprehend and implement and then backfill knowledge later.