RPC function update_response - Column name invalid

More
5 months 3 weeks 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 ?

 

Please Log in to join the conversation.

More
5 months 3 weeks ago #217415 by tpartner
You will need to replace "comments" with the SGQ value for the question (the data column name).

$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

Please Log in to join the conversation.

More
5 months 2 weeks ago #217449 by arnaudbore
Thank you, seems not that obvious looking at the doc or the error message.

Please Log in to join the conversation.

More
5 months 2 weeks 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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now