Have an idea?

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

Renaming variables in lighthouse for select all questions

Hi All,

I have a select type question which is formatted for the user to select more than one option. Is is possible to name the variables of each answer choice? For example, when I export the data to excel, the variables names are automatically Q3_1, Q3_2, Q3_3, etc. I want to change the variable names within lighthouse so when it is exported it shows up as Q3a, Q3b, Q3c.

Thank you!
asked Aug 31, 2022 by stjsmith88888888 (125 points)

1 Answer

+1 vote
The naming convention used in Sawtooth Software is locked in (standard).

You can write the existing variables Q3_1, Q3_2, Q3_3 to new variables Q3a,Q3b,Q3c using the SetValue function as follows ...


You can place these scripts in to the footer of any question, but ensure you place them after Q3 has been answered. You will also need to define Q3a,Q3b,Q3c as new variables in the pass-in fields section.

So instead of exporting Q3_1, Q3_2, Q3_3, you can now export Q3a,Q3b,Q3c.

As alternative you can export from Lighthouse Studio and rename variables in the other software (e.g. SPSS, Excel, etc.).
answered Sep 1, 2022 by Paul Moon Platinum (101,255 points)
Hi Paul, Thank you for your answer. Can you clarify how to define Q3a as a new variable in the pass-field section. Does this mean the variable has to be in the URL?
Click on the KEY button (the Access button), and select the Pass-In Fields tab. There you can enter your variables in (field name and data type are compulsory, with a comment being optional). Your data type=whole number. Click OK to save.

And these variables do not need to be in your url.

The Pass-In Fields area has 2 functions.

1/ Pass in data via a url.
2/ Defining variables within your survey and saving data to them (as in this example).