Welcome to the LimeSurvey Community Forum

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

RPC function update_response - Column name invalid

  • arnaudbore
  • arnaudbore's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 9 months ago #217406 by arnaudbore
Dear experts,
I've got trouble using the RPC function update_response. I always end up getting the error message "Invalid Column names supplied" even if I use the code or the ID of the question.
I try to update several questions of a response (not all of them).

My code looks like this:

$ResponseData = array("id" => 7, "comments"=>"TEST"); 
$resp = $lsJSONRPCClient->update_response($SessionKey,$SurveyId,$ResponseData);

The survey has a question with the code comments.

Thank in advance for your help
Arnaud

PS: is there a limitation on the type of question I can answer/update using the RPC function ? Equation/Yes-No ?

 
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #217415 by tpartner
You will need to replace "comments" with the SGQ value for the question (the data column name).

Code:
$ResponseData = array("id" => 7, "111111X222X333"=>"TEST"); 
$resp = $lsJSONRPCClient->update_response($SessionKey,$SurveyId,$ResponseData);

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, arnaudbore
The topic has been locked.
  • arnaudbore
  • arnaudbore's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 9 months ago #217449 by arnaudbore
Thank you, seems not that obvious looking at the doc or the error message.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #217517 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose