using c# client to import_survey - can't set SurveyID

More
4 months 3 weeks ago #156353 by kcl
kcl created the topic: using c# client to import_survey - can't set SurveyID
Hello Dev/Limesurvey community

I'm using a variation of a code provided by a fellow community member (attached)
The idea is to import a survey via remote control 2 api, the import goes fine without issues and I receive a random 'survey id' as response.

however, if I try to set my own survey ID, it just ignore the DestSurveyID and provide a random one.

at the code I add this line in order to add the DestSurveyID param value

client.Parameters.Add("DestSurveyID", 999333);


is there anything to configure on actual server?"
Attachments:

Please Log in to join the conversation.

More
4 months 3 weeks ago #156354 by kcl
kcl replied the topic: using c# client to import_survey - can't set SurveyID
Additional info:

this is using the .txt format
test scenario:

create a survey using limesurvey gui
export the survey as .txt
open the txt file and :

(1) remove the sid line
attempt to import using gui, survey import with different ID (expected)

(2) leave the the sid line
attempt to import using gui, survey import with different ID (expected)

(3) remove the sid line
attempt to import using API, setting all params including title and surveyID, survey import with different ID (was expecting the surveyID I specified on code)

(4) leave the the sid line
attempt to import using API, setting all params including title and surveyID, survey import with different ID (was expecting the surveyID I specified on code)




if I try importing an .lss and on .lss file I change all occurrences of the sid number, it import the with the SurveyID I specified on file.

Please Log in to join the conversation.

More
4 months 3 weeks ago #156355 by kcl
kcl replied the topic: using c# client to import_survey - can't set SurveyID
additional data:

if I try importing an .lss from API , regardless if I change the surveiID (sid) on file, and I specify the surveyID from code..., it import the with the SurveyID I specified on code.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!