Welcome to the LimeSurvey Community Forum

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

autommatically create participant table

More
6 years 2 weeks ago - 6 years 2 weeks ago #187715 by ftaras
hi,

i'm new to this forum and firs time working with limesurvay.

i would like to find a way to create and invite participants to the servay automatically. Right now using LimeSurvay API i'm able to create new survay and activate it.

I'm stuck with inviting of the participants... I can't find the way to create participants table and without it it's not possible to invite participants using add_participants method. i got error
Code:
"status": "No survey participants table"


i would appreciate any suggescion on how to get this work

thank you
Last edit: 6 years 2 weeks ago by ftaras.
The topic has been locked.
More
6 years 2 weeks ago #187718 by jelo
The table is created, when using activate_tokens. If no participants table is exisiting, it will be created.

api.limesurvey.org/classes/remotecontrol...thod_activate_tokens

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: ftaras
The topic has been locked.
More
6 years 2 weeks ago #187720 by ftaras
hi jelo, thank you for reply. I've tryed to invoke activate_token but nothing changed....

could you plese suggest what should i pass in "aAttributeFields" of the method?

i invoke the methods as follow:
Code:
 
            client.Method = "import_survey";
            client.Parameters.Add("sSessionKey", SessionKey);
            client.Parameters.Add("sImportData", Base64Encode(yourImportDataString));
            client.Parameters.Add("sImportDataType", "txt");
            client.Post();
            client.ClearParameters();
//-------------------------------------------------------------------------------
            client.Method = "activate_survey";
            client.Parameters.Add("sSessionKey", SessionKey);
            client.Parameters.Add("iSurveyID", SurvID);
            client.Post();
            client.ClearParameters();
//-------------------------------------------------------------------------------
            client.Method = "activate_tokens";
            client.Parameters.Add("sSessionKey", SessionKey);
            client.Parameters.Add("iSurveyID", SurvID);
            client.Parameters.Add("aAttributeFields",partDataint);
//-------------------------------------------------------------------------------
            client.Method = "add_participants";
            client.Parameters.Add("sSessionKey", SessionKey);
            client.Parameters.Add("iSurveyID", SurvID);
            client.Parameters.Add("aTokenId",partData);
            client.Parameters.Add("bEmail", invmail);
            client.Post();
 


and here is a listing of command execution:
Code:
------------------------------------------------
Survey created. new survey id:112724
------------------------------------------------
Survey activation result:{
  "status": "OK",
  "pluginFeedback": null
}
------------------------------------------------
Token activation:{
  "status": "OK",
  "pluginFeedback": null
}
------------------------------------------------
add participant to survey
Send invitation result:{
  "status": "No survey participants table"
}
The topic has been locked.
More
6 years 1 week ago #187721 by ftaras
ok, it seems like aAttributeFields is optional and can be ommited.

Now i got stuck with aParticipantData, still can't get the correct format to send...
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose