Have an idea?

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

Why is data not getting recorded in the customized CBC (free format) constant sum questions?

Hello,

I have a full profile CBC Constant Sum Study with following Design Specs:
Attributes: 2 (levels: 148 and 6 resp)
Concepts: 11 + None option
Tasks: 18

In order for respondents to indicate the quantity for any of the SKU, I have defined free-format questions for each of the tasks.
However, data is not getting recorded on the conjoint screens (respondents unable to navigate; auto-generation of data throws error "respondent encountered a logic error - cbcTaskRandom1_response does not have any available options.")

Below is my html table code for one concept and the none option in the first task
<table class="classic_cbc" border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
        <td>[%CBCDesignLevelText (cbc_Random1, 11, 1)%]</td>
</tr>
<tr>
        <td>[%CBCDesignLevelText (cbc_Random1, 11, 2)%]</td>
</tr>
<tr>
<td><input name="cbcTaskRandom1_response5"[%CBCDesignConceptValue(cbc_Random1, 11)%] type="number" step="1" min="0" max="10" value="0" class="text" size="4" ></td>

<td class="none_cell" rowspan="3">None of these <input name="cbcTaskRandom1_response12"[%CBCDesignConceptValue(cbc_Random18, 12 )%] type="radio", size="4"></td>
</tr>


I have also defined the response variables consistently with the HTML code (same name and data type) in the Variable Names dialogue box.

Please suggest some way to resolve this issue.
Thanks!
asked Dec 24, 2020 by Aaradhya Dave
What do you intend to do with the "CBCDesignConceptValue" calls?  As-is, your use of this function will produce weird HTML like this:

<input name="cbcTaskRandom1_response5"1 type="number"...>


Did you mean to replace the "5" with this function call?
No, I'm using CBCDesignConceptValue function to dynamically create the names for the input in the HTML section.
CBCTaskRandom_responsei (i = 1:11) are my response variables.
Currently, your code is setting the name to "cbcTaskRandom1_response5" everytime.  If you want it to be set to the value returned by CBCDesignConceptValue, it would look something like this:

<input name="cbcTaskRandom1_response[% CBCDesignConceptValue(cbc_Random1, 11) %]" ...>
This piece of code is only for 5th response variable. I have 11 concepts on a shelf display and hence, 11 response variables to record the quantities.

Do you mean I should define only 1 response variable for each task? If so, how would the quantities for 11 slots/concepts be recorded?
But the fifth column doesn't always represent the fifth concept in the CBC design, right?  You're randomizing the concepts on each page?

If this is the case, I'd expect the first column to have this:

<input name="cbcTaskRandom1_response[% CBCDesignConceptValue(cbc_Random1, 1) %]" ...>


so the resulting HTML will have whichever concept was randomly selected to be displayed first.  Then the second column would work the same, but passing a 2 instead of a 1 into that function, and so on.
Thanks Zachary,
I had defined my response variable exactly this way initially. The data did not get recorded even then and hence I had defined variables separately for each concept.

I tried this again with response variable as cbcTaskRandom1_response and just by tweaking the function parameters (1,2,...11) as per the column. But this again did not resolve the issue.
Would it be possible to share a copy of your .ssi with support@sawtoothsoftware.com so I can take a closer look at what is happening?  Any sensitive or irrelevant information could be removed from the copy before sharing it.
Sure, I have shared my ssi file with the support. Looking forward to your insights to resolve this issue.

1 Answer

0 votes
A few things stand out to me.

First, your Sawtooth Script function calls are still outside of the quotation marks that define the boundary of your HTML element's name property.  They need to look like this:

name="cbcTaskRandom1_response[%CBCDesignConceptValue(cbc_Random1, 1)%]"


Not like this:

name="cbcTaskRandom1_response"[%CBCDesignConceptValue(cbc_Random1, 1)%]


Second, your free format question should have one variable for each numeric input field, named "_response1", "_response2," and so on.

Finally, constant sum CBCs expect the none option to be a numeric field rather than a radio button.  If you are content with using a numeric here, you can make that HTML change and you should be good to go.  If you need it to be a radio button, you'll have some more work on your hands to create a way to make this work.
answered Jan 5 by Zachary Platinum Sawtooth Software, Inc. (177,175 points)
As an aside, "Custom CBC" of the Community Question Library might be helpful in more easily creating customized CBC questions.  It can be downloaded from here:

https://sawtoothsoftware.com/resources/question-library/custom-cbc
...