Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Fieldnames from variable


bsssc Apr 14, 2011 06:00 PM

Hi,

i have the following program code:

Maximum (1,SEVolt(2),FP2,False,False)
FieldNames("Max_Sensor_1")

i have a config file, which i read into an array.
like:

config(1)
config(2)
config(3)
.....

ther is something stored like config(1)="Max_Sensor_1"
config(2)="Max_Sensor_2" etc.

now my idea is to fill the names of my config file into my data tables like:

Maximum (1,SEVolt(2),FP2,False,False)
FieldNames("config(1)")

but this doenst work, the Datatable doesn't show the Max_Sensor_1. The datatable shows config(1).... :-(

has somebody any idea how to solve this problem...
or can i edit the file header of the config file ?

thx
bsssc


IslandMan Apr 18, 2011 10:11 AM

FieldNames just put whatever you enter between the quotes into the data tables. Try this.
Maximum (1,SEVolt(2),FP2,False,False)
Sample (1,config(1),String)

I'm assuming you have Declare config() as String * 20


bsssc Apr 18, 2011 10:23 AM

hi,

this is not the solution what i'm looking for. when i do it like this, my datatable will get very huge.
I want to change the fieldnames in the datatable, but this is not possibile in crbasic.

my solution now is to write it manual without the config file.

but thx for your idea.


Dana Apr 18, 2011 08:53 PM

You may want to look into the NewFieldNames instruction and see if that will work with what you are trying to do.

Dana W.

Log in or register to post/reply in the forum.