Welcome to the LimeSurvey Community Forum

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

Link from a survey to another, translating array number with checkboxes answers

  • Oterito
  • Oterito's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 month 3 days ago #267196 by Oterito
Please help us help you and fill where relevant:
LimeSurvey version: 6.6.5
Survey theme/template: Vanilla
==================
Hi everyone! I need some help. I have a long survey which I had to separate in three parts. I need translate between those surveys some array number with checkboxes answers. I usually use surveyidXgruoupidXquestionid={question} for each unique response question, and surveyidXgruoupidXquestionidsubquestionid={question_subquestion} for each multiple response question. 
I tried surveyidXgruoupidXquestionidsubquestionidresponseid={question_subquestion_response} and surveyidXgruoupidXquestionidsubquestionid_responseid={question_subquestion_response} and surveyidXgruoupidXquestionid_subquestionid_responseid={question_subquestion_response} for array numbers with checkboxes but it didn't work. How should I use the link in these cases? 

Thanks in advance!

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 3 days ago #267198 by Joffm
Hi,
sorry, I don't understand.
What is "translate between the surveys"?

Do you want to preset an array in the second survey with the values entered in the first?

Or what is the reason?

Can you send the lss export of a sample, two surveys and an explanation what has to be "translated".

But it should be sufficient to use the Qcode instead of SGQA.
Or to shorten everything only one parameter that you use in the second survey.

But as before: show a sample.

Joffm 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • Oterito
  • Oterito's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 month 2 days ago #267201 by Oterito
Hi! I have attached two surveys: Test1 and Test2. 
I need copy the answers of question F13 from Test1 to Test2, by the END URL. 

Thanks!! 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 2 days ago #267203 by Joffm
Hi,
well, the described way using the start url with single patameters for each subquestion
[url] www.limesurvey.org/manual/URL_fields/en#Start_URL [/url]
like
...&F13_1_1={F13_1_1}&F13_1_2={F13_1_2}&...&F13_9_4={F13_9_4}
is much too long.

So you have to get creative.
You only need a well defined structure with the 36 values.
To get this you may join the values of all cells in one equation (eqPara)
Code:
{join(intval(F13_1_1),intval(F13_1_2),intval(F13_1_3),intval(F13_1_4), intval(F13_2_1),intval(F13_2_2),intval(F13_2_3),intval(F13_2_4), intval(F13_3_1),intval(F13_3_2),intval(F13_3_3),intval(F13_3_4), intval(F13_4_1),intval(F13_4_2),intval(F13_4_3),intval(F13_4_4), intval(F13_5_1),intval(F13_5_2),intval(F13_5_3),intval(F13_5_4), intval(F13_6_1),intval(F13_6_2),intval(F13_6_3),intval(F13_6_4), intval(F13_7_1),intval(F13_7_2),intval(F13_7_3),intval(F13_7_4), intval(F13_8_1),intval(F13_8_2),intval(F13_8_3),intval(F13_8_4), intval(F13_9_1),intval(F13_9_2),intval(F13_9_3),intval(F13_9_4))}

Now your endurl is quite easy
Code:
https://myserver.com/lime6/818143?lang=es&F13Para={eqPara}&newtest=Y
You see I called the Parameter F13Para.

Now the second survey.
In a hidden question of type "short text" (F13Para) you capture this string.
 
In my opinion this is all you need you have a well defined structure and can access the value of each cell.
Especially as the array itself is hidden.
Nevertheless, if you want to fill the array, use a hidden equation with
Code:
{F13_1_1=if(substr(F13Para,0,1)=="1",1,'')}
{F13_1_2=if(substr(F13Para,1,1)=="1",1,'')}
{F13_1_3=if(substr(F13Para,2,1)=="1",1,'')}
{F13_1_4=if(substr(F13Para,3,1)=="1",1,'')}
{F13_2_1=if(substr(F13Para,4,1)=="1",1,'')}
{F13_2_2=if(substr(F13Para,5,1)=="1",1,'')}
{F13_2_3=if(substr(F13Para,6,1)=="1",1,'')}
{F13_2_4=if(substr(F13Para,7,1)=="1",1,'')}
{F13_3_1=if(substr(F13Para,8,1)=="1",1,'')}
{F13_3_2=if(substr(F13Para,9,1)=="1",1,'')}
{F13_3_3=if(substr(F13Para,10,1)=="1",1,'')}
{F13_3_4=if(substr(F13Para,11,1)=="1",1,'')}
{F13_4_1=if(substr(F13Para,12,1)=="1",1,'')}
{F13_4_2=if(substr(F13Para,13,1)=="1",1,'')}
{F13_4_3=if(substr(F13Para,14,1)=="1",1,'')}
{F13_4_4=if(substr(F13Para,15,1)=="1",1,'')}
{F13_5_1=if(substr(F13Para,16,1)=="1",1,'')}
{F13_5_2=if(substr(F13Para,17,1)=="1",1,'')}
{F13_5_3=if(substr(F13Para,18,1)=="1",1,'')}
{F13_5_4=if(substr(F13Para,19,1)=="1",1,'')}
{F13_6_1=if(substr(F13Para,20,1)=="1",1,'')}
{F13_6_2=if(substr(F13Para,21,1)=="1",1,'')}
{F13_6_3=if(substr(F13Para,22,1)=="1",1,'')}
{F13_6_4=if(substr(F13Para,23,1)=="1",1,'')}
{F13_7_1=if(substr(F13Para,24,1)=="1",1,'')}
{F13_7_2=if(substr(F13Para,25,1)=="1",1,'')}
{F13_7_3=if(substr(F13Para,26,1)=="1",1,'')}
{F13_7_4=if(substr(F13Para,27,1)=="1",1,'')}
{F13_8_1=if(substr(F13Para,28,1)=="1",1,'')}
{F13_8_2=if(substr(F13Para,29,1)=="1",1,'')}
{F13_8_3=if(substr(F13Para,30,1)=="1",1,'')}
{F13_8_4=if(substr(F13Para,31,1)=="1",1,'')}
{F13_9_1=if(substr(F13Para,32,1)=="1",1,'')}
{F13_9_2=if(substr(F13Para,33,1)=="1",1,'')}
{F13_9_3=if(substr(F13Para,34,1)=="1",1,'')}
{F13_9_4=if(substr(F13Para,35,1)=="1",1,'')}

1. survey
 

2. survey
 
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, Oterito

Please Log in to join the conversation.

  • Oterito
  • Oterito's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 month 2 days ago #267204 by Oterito
Thank you very much!! It worked perfect!

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose