[ic] Not able to retrieve fields from custom table

Tim Good tim.g at edsd.com
Wed May 12 14:21:50 EDT 2004


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org 
> [mailto:interchange-users-bounces at icdevgroup.org] On Behalf 
> Of John Rennie
> Sent: Wednesday, May 12, 2004 12:06 PM
> To: interchange-users at icdevgroup.org
> Subject: RE: [ic] Not able to retrieve fields from custom table
> 
> 
> > -----Original Message-----
> > From: interchange-users-bounces at icdevgroup.org
> > [mailto:interchange-users-bounces at icdevgroup.org] On Behalf 
> > Of Tim Good
> > Sent: 12 May 2004 18:35
> > To: interchange-users at icdevgroup.org
> > Subject: [ic] Not able to retrieve fields from custom table
> > 
> > 
> > Hello list,
> > 
> > First sorry for the double post previously, I was not sure
> > which email address was setup. I did not get a response to 
> > my first post so I am reposting with a more specific 
> > question.
> >  
> > Why would this code not work?
> > 
> > [perl table='delivery_schedule']
> >   $Tag->data("delivery_schedule", "charge", "[loop-data
> > transactions order_number]"); [/perl]
> > 
> > (mysql 3.23.58 on Redhat 8.0 non threaded perl 5.8.2 interchange 5.2
> > stable)
> > 
> > All help is much appreciated.
> > 
> > Tim
> 
> Hi Tim,
> 
> You don't say exactly what 'not work' means, so this is a guess...
> 
> >From the interchange rtfm tags reference, perl tags are not 
> >interpolated
> by default. So
> [perl table='delivery_schedule' interpolate=1]
>   $Tag->data("delivery_schedule", "charge", "[loop-data 
> transactions order_number]"); [/perl]
>  should work better.
> 
> You might also want to switch to single quotes within your 
> perl, to avoid the risk of any interpolation (e.g. \n or $) 
> of your data (unlikely with an order number, but you may have 
> an odd format).
> 
> Best regards,
> 
> John.
> 

John,

Thank you for the response and thanks for the advice on using single
quotes. 
What does not work is that it returns nothing. 
If I don't use the interpolate=1 and change the tag to:
[perl table='delivery_schedule' interpolate=1]
   $Tag->data("transactions", "order_number", "[loop-data transactions
order_number]"); 
[/perl]
I get something returned. To clarify, I use
"transactions","order_number" just to test
the results and use of the tag. The interpolate is not necessary, at
least in the test 
above. I think, according to my research/reading of documentation,
it does not work because of something to do with delivery_schedule table
being a 
custom table and the data tag wants to work with product tables or
transaction tables?
Just a stab at what I can see so far. 

Any ideas?

Thanks,

Tim




More information about the interchange-users mailing list