Hi,
I have couple of problems with accessing variables and could not find any relevant post on the subject. Appreciate if any one has faced these issues and found some workarounds:
Background: I have a table with say 10 fields amount_1, amount_2, … amount_10. and I need to access these fields using a for loop and assign some computed values.
When I directly try {amount_1}=999; it works, however if I construct a variable for e.g.
$i=1;
$tmp=’{amount_’.$i.’}=999;’;
and do an
eval($tmp); – it does not work. Further if I do an echo $tmp; – it shows a space in between { braces – like – { amount_1}=999;
This is strange SC is adding a blank space after {
I have tried many events including OnLoad.
Second issue is what is the best way to do a total of these fields – which event.
Apart from the above 10 amount fields I have a total field. How do I display the total in the form whenever any of these amount are changed / update.
Regards,
Chetan