- Posts: 43
- Thank you received: 1
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
- Topic Author
- Offline
- Senior Member
Less
More
2 years 9 months ago #217406
by arnaudbore
RPC function update_response - Column name invalid was created 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:
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 ?
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:
The survey has a question with the code comments.$ResponseData = array("id" => 7, "comments"=>"TEST");
$resp = $lsJSONRPCClient->update_response($SessionKey,$SurveyId,$ResponseData);
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10635
- Thank you received: 3698
2 years 9 months ago #217415
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic RPC function update_response - Column name invalid
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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 1
2 years 9 months ago #217449
by arnaudbore
Replied by arnaudbore on topic RPC function update_response - Column name invalid
Thank you, seems not that obvious looking at the doc or the error message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
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.
Replied by DenisChenu on topic RPC function update_response - Column name invalid
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.