Please help us help you and fill where relevant:
LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]6.14.0
Own server or LimeSurvey Cloud:LimeSurvey Cloud
Survey theme/template:bootswatch
==================Dear LimeSurvey team,I’m designing a
conjoint experiment using LimeSurvey (Cloud version 6.14), and I’ve run into a serious issue regarding
data export of randomized values.Here’s what I need the system to do:
✅ 1. Randomize and record attribute valuesEach respondent sees
two policy proposals (Option A and Option 
, each with
six attributes. The content of these attributes is
randomly selected using JavaScript upon loading the page.I use JavaScript to generate these random values and then store them into 12 hidden questions:
-
to
→ for Option A’s six attributes
-
to
→ for Option B’s six attributes
- plus one more hidden variable
to record the randomized order of attributes shown on the screen.
These hidden variables must be exported with the response data for later analysis.
✅ 2. Ensure Option A and B are not identicalTo avoid showing identical options to the respondent, I use a
loop in JavaScript to ensure that
Option A and B do not have exactly the same combination of attribute values.Here’s an example of the logic:
Code:
// Attributes for Option A
window.random61 = Math.floor(Math.random() * 3) + 1;
window.random63 = Math.floor(Math.random() * 4) + 1;
// ...
// Attributes for Option B – must differ from A
do {
window.random62 = Math.floor(Math.random() * 3) + 1;
window.random64 = Math.floor(Math.random() * 4) + 1;
// ...
} while (
window.random61 === window.random62 &&
window.random63 === window.random64 &&
// ...
);
// Store values
LSvar.codeA1 = window.random61;
LSvar.codeA2 = window.random63;
// ...
LSvar.codeB1 = window.random62;
LSvar.codeB2 = window.random64;
// ...
LSvar.attorder1 = randomizedOrderString;
❌ The problem:Although everything works in the browser —
✔️ The JavaScript executes
✔️ The
,
, etc. are correctly populated (confirmed in the browser console)✔️ The hidden short-text questions exist in the same page, and are selected in the export options→
The exported response data does not contain the actual values for these 13 variables — they are all blank in the CSV output.
✔️ The hidden short-text questions exist in the same page, and are selected in the export options→
The exported response data does not contain the actual values for these 13 variables — they are all blank in the CSV output.
Is there any way to solve my problem?