Welcome to the LimeSurvey Community Forum

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

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

More
6 years 9 months ago #156353 by kcl
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:
The topic has been locked.
More
6 years 9 months ago #156354 by kcl
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.
The topic has been locked.
More
6 years 9 months ago #156355 by kcl
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.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose