[ic] Valid ITL?

Grant listbox at email.com
Fri Oct 31 12:02:28 EST 2003


> On Fri, 31 Oct 2003 11:24:05 -0800
> "Grant" <listbox at email.com> wrote:
>
> > Could someone tell me if the following is valid ITL inside of a loop?
> > Usually I test this type of thing in the Test Code section of
> the UI, but I
> > think this would be difficult to test.
> >
> > [if-loop-field date < [time adjust='-[calc] ([scratch
> delete_records_days] *
> > 24) + [loop-field duration] [/calc]']%Y%m%d%H%M%S[/time]]
> > 	[perl]
> > 		$Db{ebay_listed}->delete_record("$Tag->loop-code");
> > 		undef;
> > 	[/perl]
> > [/if-loop-field]
>
> This isn't invalid ITL and is probably hard to turn into it.
> Use embedded Perl / [loop-exec].

I think the above was probably a typo, but I've got to double-check.  Is the
code I wrote valid ITL?

- Grant

>
> Example:
>
> # Display currency according to locale
> Sub <<EOS
> sub currency_symbol {
>     my $pos = $_[0] || 3;
> 	$Scratch->{currency_symbol} =
> $Config->{Locale_repository}->{$_[1]->[$pos]}->{currency_symbol};
> }
> EOS
>
> [query list=1 sql="select sum(balance),locale from
> gift_certificates where type = 'Gift Certificate' [scratch qual]
> group by locale"]
> [list]
> Total Balance ([sql-exec currency_symbol]1[/sql-exec]): [sql-code]<br>
> [/list]
> [/query]
>
> Ciao
> 	Racke



More information about the interchange-users mailing list