Hi,
Is it possible to reference an instance of an object by one of its variables?
Say I have Text fields called text1, to text9, each with an instance variable of ID that I manually enter, and a number of other instance variables called segment1, segment2, segment3, ..., segment9
I have a 'for' loop, and within the loop I want to be able to say:-
iCtr = 0
For 0 to 9
Carry out a task to calculate result
'Update text(n) field with result
set text & (ictr).Segment1 = result
'or even
set text.Segment(ictr) = result
iCtr = iCtr+1
Next
or failing that, could I do similar with a Global constants, e.g global1, global2, global3, ..., global9:-
iCtr = 0
For 0 to 9
Carry out a task to calculate result
'Update global with result
set global & (ictr) = result
iCtr = iCtr+1
Next
Basically I am trying reference fields/objects programmatically using their name/id. I know I could loop through object instances, but I already have a number of loops so I am trying to avoid that if at all possible.
Thanks in advance!