Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding the numeric position of a field
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00093195
Message ID:
00093208
Views:
25
>I need to find the position of a field in a table and return the position as a number -- 1 = the first field, 2 = the second field, and so on. VFP has no FIELDNO() function, so I am using a FOR/ENDFOR loop to step through the fields in the table until myFieldName = FIELD(). Since I have to do this for hundreds of controls, it is VERY SLOW. Any thoughts on a more elegant means of retrieving field numbers?
>
>Thanks in advance.
>
>JME

James, have you checked out AFIELDS()? The field number will correspond to the array row.

HTH
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform