>Is there a command the returns the opposite result of FIELD() Function? Because FIELD() returns the name of a field, referenced by number, in a table.
>
>I am looking for a function that returns the number of a field, referenced by name, in a table. Any such thing?
>
>The reason is that I have a group of 40 fields in the middle of my table and I have to check them all for a certain value. But I want to start checking at say field #30 and check until I get to field #70 for a common value. All fields are character 1.
>
>I figure if I determine the starting field number, I can loop through the fields until I reach the ending field number. And if I do the loop based upon field numbers, I would not care if additional fields were ever added in between the exisiting fields as long as they were Char 1 and used for the same purpose as the other 40 fields surrounding them.
>
>What do you think? Thanks for a clue.
lcField = "myField"
for ix = 1 to fcount()
if field(ix) = upper(lcField)
exit
endif
endfor
for jx = ix to fcount()
...
endfor
I don't knwo of a function just doing the opposite.
Cetin