Welcome to the LimeSurvey Community Forum

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

export_responses_by_token not returning multiple choice with comments

  • sshaffer
  • sshaffer's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 2 months ago #192773 by sshaffer
Hi,

I'm using your api to return survey responses, and I can't seem to get it to return the comments associated with a question type of multiple choice with comments. I'm calling the export_responses_by_token method. Here are the parameters I am passing:

Client.ClearParameters();
Client.Parameters.Add("sSessionKey", SessionKey);
Client.Parameters.Add("iSurveyID", surveyID);
Client.Parameters.Add("sDocumentType", "json");
Client.Parameters.Add("sToken", token);
Client.Parameters.Add("sLanguageCode", "en");
Client.Parameters.Add("sCompletionStatus", "complete");
Client.Parameters.Add("sHeadingType", "full");
Client.Parameters.Add("sResponseType", "long");
Client.Method = "export_responses_by_token";
Client.Post();

For a response, I am getting this (just cutting and pasting the relevant json, there is a lot more than this obviously):

{
"question": "You indicated that a family member was diagnosed with a bleeding disorder. Please select any which apply and tell us which of your child's relatives was affected. [Von Willebrand disease]",
"answer": "Yes"
},
{
"question": "You indicated that a family member was diagnosed with a bleeding disorder. Please select any which apply and tell us which of your child's relatives was affected. [Comment]",
"answer": ""
},

The question is "You indicated that a family member...", the checkbox is "Von Willenbrand disease", and the text is supposed to be in "Comment" answer, but as you can see it is blank.

I'm not sure if there is any other setting/parameters I should be using to get it to return the comment, but the api documentation web page seems to be unavailable ( api.limesurvey.org ) so I'm posting a question here.

Thank you,
Sean
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose