Have an idea?

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

SEC calculation

Dear Support,
Can you please tell me what's wrong with this code ?

<input name="Job_Score" id="Job_Score" type="hidden" value="[%Begin Unverified Perl
if(VALUE('SEC2')==1){return '0';}
if(VALUE('SEC2')==2){return '2';}
if(VALUE('SEC2')==3){return '3';}
if(VALUE('SEC2')==4){return '4';}
if(VALUE('SEC2')==5){return '5';}
if(VALUE('SEC2')==6){return '6';}
if(VALUE('SEC2')==7){return '7';}
if(VALUE('SEC2')==8){return '1';}

End Unverified%]">
as i need to calculate the score for this variable
asked Jan 24, 2019 by Marwa
Should the 2nd "if" onwards be "elsif"?

Ensure you have defined "SEC2" exactly that way as Perl is case sensitive. This variable should be a whole number too.

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.