To get a field pointer to a field from the field name you can loop through the 
table incrementing the field number until you find the correct name and return 
a pointer to it, this is very fast since it is all in memory.

For ($i;1;Get last field number($TableNumber))
        If (Is field number valid($TableNumber;$i))
                If (Field name($TableNumber;$i)=$TestFieldName)
                        $PointerToField:=Field($TableNumber;$i)
                        $i:=Get last field number
                End if 
        End if 
End for 

If you use this a lot you can use a cache array to store the pointers and field 
names, but like I said this runs very fast.


Neil



Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to