Welcome to the LimeSurvey Community Forum

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

API inconsistency: Missing answer content for single-choice questions ?

  • raptyk
  • raptyk's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 3 weeks ago - 3 months 3 weeks ago #267287 by raptyk
I've encountered another issue with the API.
I'm retrieving a list of survey questions ("method": "list_questions") and a list of responses ("method": "export_responses").

For questions with multiple answers (checkboxes), I receive the content of these answers in the API (list_questions) response, e.g., "SQ001" = "bla bla bla bla"


Unfortunately, it turns out that for questions with a single answer (radio buttons), I don't receive the content of the answer, e.g., AO01.



In my usage scenario, I need both the content of answers for single-choice questions (radio buttons - AO01) and multiple-choice questions (checkboxes - SQ001), but the API only returns the content of answers for multiple-choice questions.

What's the best way to work around this problem and also retrieve the possible answers for questions with only one selectable answer (AO01)?
ex. "AO01":"Co 3 miesiące" 

Why does it work this way?
Last edit: 3 months 3 weeks ago by raptyk.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 3 weeks ago #267288 by Joffm
Hi,
I do not see an inconsistgency.
You neither see answer options in the multiple question nor in the single question.

I receive the content of these answers

No, you only see the code of the subquestions.
Remember: You may consider a multiple question as a series of single (sub)questions with answer options "Y" and ""

And this is what you see: the subquestion, but not the answer options.

In your screenshots you see (multiple)
question: the text of the subquestion
title: the code of the subquestion

(single)
You show the same response result, but a different question

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • raptyk
  • raptyk's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 3 weeks ago - 3 months 3 weeks ago #267289 by raptyk
Thank you for the explanation.

Remember: You may consider a multiple question as a series of single (sub)questions with answer options "Y" and ""
And this is what you see: the subquestion, but not the answer options.

I understand that it's a matter of organization, but for me, as someone unfamiliar with the topic, it seemed strange.

What would be the simplest way to retrieve the text values corresponding to the codes AO01, AO02, etc., preferably in bulk for the entire survey and all its questions?
Last edit: 3 months 3 weeks ago by raptyk.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose