Have an idea?

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

ACBC - Winner Configuration (ACBCWinnerLabel)

Hi Team,

I am using the following code to display Winner Configuration table

  <td><font color="black"> Where Connects</font></td>
  <td><font color="black"> [% ACBCWinnerLabel (Axe, 1) %] </td>
  <td><font color="black"> Program Sources Supported</font></td>
  <td><font color="black"> [% ACBCWinnerLabel (Axe, 2) %] </font></td>

We are hiding some attributes using 'Alternative-Specific'. So some of the attributes will not be shown in BYO section. We want to use if condition in the above codes i.e., need to list only the attributes which are shown to the respondents. Currently it shows all attribute level values even if it is not shown BYO.

Kindly help.
asked Jan 16, 2015 by Abdul Bronze (1,580 points)

1 Answer

+1 vote
Best answer
Hi Abdul,

I think a bug was introduced with alternative-specific designs such that instead of returning a zero, the WinnerLabel function is returning the text from the level, while the WinnerValue function is working correctly (should return a zero if the attribute is missing).  Our developers are aware of the issue and it should be fixed in the next release of SSI Web.

As a workaround, I put the entire <tr> to </tr> tag for the alternative-specific attribute into a list, and then wrote an if/then statement to conditionally put it on the page.  For example, let's pretend attribute 2 only shows if attribute 1 is level 4.  I could put the following in for attribute 2

[%Begin Unverified Perl

if(ACBCWINNERVALUE("ExerciseName",1)) == 4)



That way, the entire table row code only gets shows, and then existing ACBCWinnerLabel function only executes if the 1st attribute was level 4.  Otherwise, the row doesn't even exists when the question shows to the respondent.  The list is used mainly because it's annoying to escape all of those HTML characters.
answered Jan 20, 2015 by Brian McEwan Gold Sawtooth Software, Inc. (38,015 points)
selected Jan 20, 2015 by Abdul
Thanks Brian. It is very helpful.