Hi Alan,

If you have the table number, you can loop over the fields of that table and 
compare the name to the given name to get the field number and thus the field 

Something like:

//$foundtable is the table number
//if pointer given, $foundtable := Table($tablepointer)

For ($i;1;Get last field number($foundtable))
        If (Is field number valid($foundtable;$i))
                If ($fieldname=Field name($foundtable;$i))
                        $foundfield:=$i//found it
                        $i:=Get last field number($foundtable)+1//jump out of 
                End if 
        End if 
End for 

$ptr:=Field($foundtable;$foundfield)//get the pointer


> Op 17 mei 2018, om 18:19 heeft Alan Tilson via 4D_Tech <4d_tech@lists.4d.com> 
> het volgende geschreven:
> Is it possible to extract a pointer to a field from the table number or
> pointer and the field name?
> I'm loading a field using EXECUTE FORMULA and building the
> [tablename]fieldname into the formula, which serves my purposes but seems
> rather awkward!

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