- Posts: 963
- Thank you received: 217
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Linking surveys: start of documentation
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
bugs.limesurvey.org/view.php?id=12133
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
To merge the results of linked surveys the most straight forward method is to use the automatically generated SAVEID of the first survey and transfer it via URL to the following surveys. That way you can use linked surveys even when not using tokens.I heard that you can also work with tokenized surveys, as long as the token tables of linked survey are identical. On second thought: I guess you only need a token table for the first survey and just pass the token to the second survey as a variable that is store somewhere. Later you have to combine the results tables based on the tokens. Have you ever used that?
manual.limesurvey.org/URL_fields/en#Basic_fieldsSAVEDID is the id assigned to this particular submission,
To merge the responses you then start with the last linked survey. That's where the completes (over all linked surveys) can be identified. I usually used SPSS to merge the surveys via the SAVEIDs (from the first survey) saved in the last linked survey.
When using tokens you can have the issue that people use the same token to start again and again till the surveypart is completed. To merge responses via token you would need to clean every incomplete response in every linked survey first. Using the SAVEIDs will save some work and works in every setup.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
- Posts: 963
- Thank you received: 217
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
- Posts: 963
- Thank you received: 217
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
Sorry for confusion. You're right. I mean the response ID.tammo wrote: The surveyID is always the same when coming from survey1 (it is 111111). Do you mean the response ID, or am I missing something?
But in LS they call the responseID SAVEID. That's what I confused with SurveyID.
I edited my post to correct the names and linked to the documentation of the URL variables.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
- Posts: 963
- Thank you received: 217
Tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
- Liod_DS
- Offline
- Senior Member
- Posts: 54
- Thank you received: 1
Finally someone gets a similar problem
I've linked to surveys time ago, and now they are in field every month (like a traking) I've experienced all the issues you guys point there...
it's not a long survey, but I have 2 huge masks (multi questions, 400+ row, used to filter a few singles)..
I even tried to re-build postgree to increment the 1600 column limit (with no success, on test server) since my survey is private (token) and forward only I choose to link the first part with the second... passing some var via URL like you said..
in addition, I've added some script on the template to jump from the part1 to the part2 when the original(part1) link is re-clicked
/* * *TOKEN REDIRECT * */ $(document).ready(function() { // Define the new message var redirect_text = 'Attendi mentre carichiamo le tue risposte.<br><img src=\"http://www.tbaf.org.tw/event/2016safe/imgs/loader1.gif\">'; // Insert the new message if($('#tokenmessage').length > 0) { if($('#tokenform').length > 0) { /*token messagge in ingresso, identifica la form dove inserire i numeri*/ } else { $('#tokenmessage').html(redirect_text); var url = "URL"; url += findToken(); //helper function to extract the token url += "/newtest/Y/lang/it"; //alert(url); window.location.replace(url); } } });
Sometimes (I think 1 of 200-300 cases) a user can't get to the part2, and he remains stuck between the two surveys...
I think some URL were lost in the process (I have a script that control if all the cars are set in the url)
did it happen to you too?
keep improving
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
The redirection itself can be seen as an invalid action by security settings in the browser or antimalwaresecurity software. So you never have 100% when using survey redirection.Liod_DS wrote: Sometimes (I think 1 of 200-300 cases) a user can't get to the part2, and he remains stuck between the two surveys...did it happen to you too?
Your javascript will redirect respondents, which have finished the first survey with their token and get redirected to the second survey?
I'm unused to the content of #tokenmessage and #tokenform.
Since you're only testing for the length, what does it tell us?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10630
- Thank you received: 3696
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
Thanks for the insight. Wonder if this script really copes with all situations then.tpartner wrote: Checking for the length of #tokenmessage and #tokenform tests to see if this is the token entry screen - these are elements found only in that screen.
Situations:
Token in URL - Token already used >>
Token in URL - Token not used >>
Token Screen - Token already used >>
Token Screen - Token not used >>
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- Liod_DS
- Offline
- Senior Member
- Posts: 54
- Thank you received: 1
It's exactly like tPartner said (i have to credit him for a lot of the scripts ), the token screen is overwritten, so you have only the URL input method, and:
with the link of "first survey"
IF no token used -> first survey start
IF token survey 1 used -> redirect to survey 2 -> survey 2 start
IF token both used -> redirect to survey 2 -> survey 2 token message (survey 2 HAVE TO use a different template!)
[edit]
with the link of "second survey"
IF no token used -> i check for ALL the URL parameter to be !NULL (so it stop with a warning)
IF token survey 1 used -> survey 2 start
IF token both used -> survey 2 token error or resume
no other scenario revealed until now ...
PS. the token is ported by a little url-parser script
/* funzione ad hoc per il recupero del token*/ function findToken() { var sPageURL = window.location.href; // alert(sPageURL); var sURLVariables = sPageURL.split('/'); for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables[i]; if (sParameterName == "token") { return sURLVariables[i+1]; } } }
keep improving