Have an idea?

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

Show ACBCWinner only if ACBC is shown

Hey guys, I just want to display the ACBC Winning Concept at the end. But some of my respondents don't conduct the ACBC - if so, there should be nothing and no blank table like now.

The following code shows the Winning Concept:
<font style="font-size:0.83em" color=""><table id="WinningConcept" border="1" cellpadding="10" width="100%">
<tr>
  <td><font color="black"><b><i>Brand</i></b></font></td>
  <td><font color="black"> [% ACBCWinnerLabel (ACBCLI, 1) %] </td>
</tr>
<tr>
  <td><font color="black"><i><b>Type</b></i></font></td>
  <td><font color="black"> [% ACBCWinnerLabel (ACBCLI, 2) %] </font></td>
</tr>
<tr>
  <td><font color="black"><i><b>Engine</b></i></font></td>
  <td><font color="black"> [% ACBCWinnerLabel (ACBCLI, 3) %] </td>
</tr>
<tr>
  <td><font color="black"><i><b>Weight</b></i></font></td>
  <td><font color="black"> [% ACBCWinnerLabel (ACBCLI, 4) %] </font></td>
</tr>
<tr>
  <td><font color="black"><i><b>Price</b></i></font></td>
  <td><font color="black"> [% ACBCWinnerLabel (ACBCLI, 5) %] </td>
</tr>
</table></font>


But now I probably have to insert a Perl script which manages the if/else topic. Something like this:

[% Begin Unverified Perl
if (LISTHASPARENTMEMBER("Randomization",4)) {
    return ...;
}
return ...;
End Unverified %]


I got no idea how to deal with it, because I can not insert the JavaScript from above after return?

Any ideas how to fix it?
asked Jan 27 by Honeybadger Bronze (890 points)
Any script that could be written outside of unverified Perl can be written within it, though some of it may need to be adjusted to fit Perl's rules.

my $example = '<td><font color="black">' . ACBCWINNERLABEL('ACBCLI', 1) . '</td>';


If that is too complex, you could just use the unverified Perl to hide an element on the page.

return '<style>#WinningConcept { display: none; }</style>';
Thanks!!!

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.
...