Have an idea?

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

Pass-In Filter


I have pass-in field called "sample" which has values of "M" and "H", the following if statement showing error, kindly help me to correct it

[% Begin Unverified Perl

my $txtMessage1 = "How many notebooks did you buy for your ";

if (sample="M")
{return $txtMessage1 . LABEL("S6")}
{return "How many notebooks did you buy for school";}

End Unverified%]during this back-to-school season? 
asked Jul 9, 2014 by Abdul Bronze (2,630 points)

1 Answer

+1 vote
Best answer
I notice you don't have a ; after your first "return" statement.  Also for a text expression do you need to use eq instead of = (sample eq "M")
answered Jul 9, 2014 by Jay Rutherford Gold (35,955 points)
selected Jul 9, 2014 by Abdul
Thanks Jay. It works perfect.