Have an idea?

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

CBC - Free Format


I created a free format CBC question.  My client now is asking that I do not show a row in the table if the cbc design level = 2.  

I tried to do this by using the below perl
[% Begin Unverified Perl

if (CBCDESIGNLEVELVALUE("CBC_Random1",1,5) == 1)
     return '<tr> <td > Product Carrot (Membership required to purchase)  </td> <td> <center>' .CBCDESIGNLEVELTEXT ("CBC_Random1", 1, 5). '</center> </td>'.    LISTLABEL("CBCRnd01whtRowList",7) LISTLABEL("CBCRnd01brlRowList",7).'</tr>';  

End Unverified %]

but I am getting a Sawtooth Error #132
syntax error at (eval 235) line 5, near ") LISTLABEL"

I can not locate my error.  

Please help

thank you in advance
asked Aug 5, 2020 by anonymous

1 Answer

0 votes
You have two "LISTLABEL" calls right after each other.  If you mean to display one and then the other, you need to concatenate them with the dot operator like you have done elsewhere:

return '<tr><td>Product Carrot (Membership required to purchase)</td><td><center>' . CBCDESIGNLEVELTEXT("CBC_Random1", 1, 5) . '</center></td>' . LISTLABEL("CBCRnd01whtRowList",7) . LISTLABEL("CBCRnd01brlRowList",7) . '</tr>';
answered Aug 5, 2020 by Zachary Platinum Sawtooth Software, Inc. (177,175 points)