Variables and secondary source question (looping)

R

RonL

When trying to obtain data using a loop from a secondary source.
var data1 = oSecondary......dfs:.../dfs.../tbl ..../field1.text , how can I
use a variable to assign data1 - 15 from field1-15. I have tried to setup a
variable concatinating 1-15 to field but it doesnt know how to translate the
variable ..

or, setting up an array .. data[15] can I do that to recieve the data ..
if so how ?
I try to define a String data[] = new string[15] but that isnt recognized
either ...
Please help, I am very new at this.
 
K

K.Ramana Reddy(GGK Tech)

Hi,

Do you want the display all 15 values and what do you want to do with that
data?
 
R

RonL

Ijust need to access the fields to pass the data to a function.
Hardcoded the code works fine, however it will end up being a lot of code,
the vaiable looping will work much better. I just can not get it to
recognize what I am trying to do.

read 15 fields into 15 data variables ... the data variable could be an
array so the [] can contain the x variable. (see below)

My variables do not work.

one attempt is swimilar to below.

for(X=1;x<=15;x++)
{
arg2 = 'field' + x
arg = 'data' + x
arg = ("oSoSecondary......dfs:.../dfs.../tbl ..../arg2").text
}


for(X=1;x<=15;x++)
{
arg = 'data' + x
function(arg) // I would think this should be $arg..
}

Thanks for helping

K.Ramana Reddy(GGK Tech) said:
Hi,

Do you want the display all 15 values and what do you want to do with that
data?

--
k.Ramana Reddy
http://www.GGKtech.com


RonL said:
When trying to obtain data using a loop from a secondary source.
var data1 = oSecondary......dfs:.../dfs.../tbl ..../field1.text , how can I
use a variable to assign data1 - 15 from field1-15. I have tried to setup a
variable concatinating 1-15 to field but it doesnt know how to translate the
variable ..

or, setting up an array .. data[15] can I do that to recieve the data ..
if so how ?
I try to define a String data[] = new string[15] but that isnt recognized
either ...
Please help, I am very new at this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top