Smartelf
unread,Aug 29, 2012, 7:01:35 PM8/29/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to excelt...@googlegroups.com
Hi,
I need a cell to display one of 3 possible values, based on a global variable. However, none of my if conditions are being used?
Code below:
Thanks in advance,
--Smartelf
lets say my xml looks like this:
<loop name="loop1">
<loop name="loop2">
<if name="myGlobal" value="0">
<cell text="A">
<cell text="$i" />
</if>
<if name="myGlobal" value="1">
<cell text="B">
<cell text="$i" />
</if>
<if name="myGlobal" value="2">
<cell text="C">
<cell text="$i" />
</if>
</loop>
</loop>
and my perl code looks as following:
my $hash;
foreach my $i (0..10){
foreach my $j(0..10){
$hash{loop1}[$i]{loop2}[$j]{i} = $i * $j;
}
}
$hash{myGlobal}=1;
...
$template->param(%hash);