Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How do I Store Answer Code only in Array Question

  • Dreardon
  • Dreardon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 hours 33 minutes ago #270818 by Dreardon
I'm using array question type for two checklists in my survey.  Each has a list of sub-questions identifying psych symptoms with the code value for each subquestion renamed to a summary abbreviated Code like "Guilt."  There are four answer options from "not at all" to "very much" which are coded from 0 to 3.   

The problem is that the answer is recorded in the database as Guilt[1] not just as the numeric value 1.

How do I get the responses to be stored as the numeric value of the Answer option value in the Code for Answer Options?  

Attached is the export of the array checklist.

Please Log in to join the conversation.

  • Dreardon
  • Dreardon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 hours 7 minutes ago #270819 by Dreardon
I finally discovered that I was being misled and given the run around by ChatGPT which failed to recognize the difference between . and underscore.

Checklist1.Circumstance returns the label but Checklist1_Circumstance returns the value

So all my efforts to sum the . version of the variables failed, but this was fixed when using the _ versions.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose