Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read field list with variable and For loop 1

Status
Not open for further replies.

csjoseph

MIS
Jan 2, 2001
247
US
I have a list of fields:

FeatureName_1
FeatureName_2
FeatureName_3
etc.

I have a field NumFeatures that controls how many fields are displayed.

In a view I'm trying to capture all the values that are displayed like this:

Code:
@For(
	x:=1;
	x<=NumFeatures;
	x:=x+1;
	temp1:= FeatureName_ + @Text(x)
      );

The last line is my problem. I get the value of X returned. Can I do what I'm trying to do?
 
Seems that FeatureName_ should be in quotes.

Pascal.


I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
When I do that I get the string "FeatureName_x" returned. Not the value of the field called FeatureName_x.
 
Now that you have the field name, you should use it to add its value to your list with the @GetField function.

Pascal.


I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
That is the command I was looking for.

Thanks Pascal.
 
You're welcome.

:)


I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top