Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Value function in perl script

Hi,
I am trying to convert the below code

$html .= '<td>' . VALUE("S7_A1"). '</td>';


in to

my $s7var = 'S7_A';
if ($ival == 1)
{$s = 1;}
$html .= '<td>' . VALUE . '("' . $s7var . $s . '")' . '</td>';


but it prints as below
("S7_A1")

Please help me to correct the code.
asked Nov 23 by Abdul Bronze (3,015 points)

1 Answer

0 votes
 
Best answer
Try this:

$html .= '<td>' . VALUE($s7var . $s) . '</td>';
answered Nov 23 by Zachary Platinum Sawtooth Software, Inc. (188,925 points)
selected Nov 23 by Abdul
Thank you. It works
...