glad to help!
Chip

> Chip, your example worked great and kept me from having to wrap everything
> with Execute (which would have been more annoying.)
> 
> It turns out, after all this, that there is no data in the sub-subtable.
> Client, of course, had no idea... This is great because I can quit working
> in 2004 and get back to v16.
> 
> And, if you want to renew your enthusiasm for the progress 4D have made in
> the product over the years, go work in 2004 for a while...
> 
> 
> On Fri, Oct 13, 2017 at 11:13 AM, Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Kirk :
>> yes.
>> if I remember the subtable syntax correctly....
>> 
>> Execute formula("x_text:=[table]subtable1.subtable2.fieldname")
>> 
>> Lee
>> I am not sure that this will work, but if it does it might make your
>> life easier...
>> have 1 method (which will likely have to be hard coded) to get pointers
>> to all the sub-subtable fields
>> populate the pointers into an inter process pointer array.
>> Then you can loop over them to extract data
>> 
>> Get pointers to sub_subtable_fields
>> array pointer(<>Sub_sub_Field_Pointers;number_of_Sub_sub_Table_Fields)
>> 
>> execute
>> formula("<>Sub_sub_Field_Pointers{1}:=->[table]
>> subtable1.subtable2.field_1_name")
>> execute
>> formula("<>Sub_sub_Field_Pointers{1}:=->[table]
>> subtable1.subtable2.field_2_name")
>> execute
>> formula("<>Sub_sub_Field_Pointers{1}:=->[table]
>> subtable1.subtable2.field_3_name")
>> ....
>> 
>> then for data extraction:
>> 
>> For($i;1;number of records in sub-subtable)
>>   For($ii;1;size of array(<> Sub_sub_Field_Pointers))
>>     Text_variable :=Text_variable + utility_convert_to_Text(<>
>> Sub_sub_Field_Pointers{$ii})
>>   end for
>> end for
>> 
>> send packet(Text_variable)
>> 
>> On Fri, 13 Oct 2017 10:48:16 -0700, Kirk Brooks via 4D_Tech wrote:
>>> Tim,
>>> On Fri, Oct 13, 2017 at 8:50 AM, Tim Nevels via 4D_Tech <
>>> 4d_tech@lists.4d.com> wrote:
>>> 
>>>> If I remember correctly, the 2004 method editor will show sub-subtable
>>>> field references, but as soon as you edit a line with the reference (or
>>>> maybe even retokenize the whole method) it drops the sub-subtable
>>>> references. So you have to replace all these lines of code with EXECUTE
>>>> commands. And you’ll have to write all the sub-subtable conversion code
>> as
>>>> a series of EXECUTE commands for every line with a sub-subtable
>> reference.
>>> 
>>> 
>>> ​Really interesting hack. ​I'm trying to visualize this - "So you have to
>>> replace all these lines of code with EXECUTE commands."  Do you mean
>>> opening the structure in 2004 will show the names of the sub-subtable
>>> fields so you can then write the code using that name and run it with
>>> EXECUTE and not choke?
>>> 
>>> --
>>> Kirk Brooks
>>> San Francisco, CA
>>> =======================
>>> 
>>> *The only thing necessary for the triumph of evil is for good men to do
>>> nothing.*
>>> 
>>> *- Edmund Burke*
>>> **********************************************************************
>>> 4D Internet Users Group (4D iNUG)
>>> FAQ:  http://lists.4d.com/faqnug.html
>>> Archive:  http://lists.4d.com/archives.html
>>> Options: http://lists.4d.com/mailman/options/4d_tech
>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>>> **********************************************************************
>> ---------------
>> Gas is for washing parts
>> Alcohol is for drinkin'
>> Nitromethane is for racing
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **********************************************************************
>> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
------------
Hell is other people 
     Jean-Paul Sartre
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to