Welcome to the LimeSurvey Community Forum

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

Individual survey question for a number survey participants

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 5 months ago - 6 years 5 months ago #168804 by Joffm
Hi, I am working on a - in my opinion - nice idea.
It's a kind of looping through your 65 datasets.

Add to the survey-URL a parameter "dsno" for "DataSet number".

so the url is something like:
Code:
https://www.myServer.com/limesurvey/index.php/[SurveyID]?token=1111&dsno=1

In your survey you grab the dsno.

Then there is the "multiple short text" question about documents.
In the question text enter the equation
{if(dsno==1,"Name of Dataset 1",if(dsno==2,"Name of Dataset 2",if(dsno==3,"Name of Dataset 3",...)))}

At the end change the dsno to dsno+1.
And in the end-url you link to the same survey (now with the same token and the new Dataset number)
Code:
https://www.myServer.com/limesurvey/index.php/[SurveyID]?token={TOKEN:TOKEN}&dsno={dsno}

At the end (dataset number = 65) empty the end-url or set a quota=0 on dataset number.
So you get 65 records in your answer table for each participant.

That's an idea to avoid problems with the column limits.

Best regards
Joffm

P.S. Are there always 65 datasets? In your survey I saw conditions up to 90, or so.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 5 months ago by Joffm.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 5 months ago #168851 by Joffm
Hi,

I finished my idea.
First there is a "global" survey with some general questions which links to a second survey.
This second survey contains only the two questions about documents and plans for one dataset and afterwards links to itself to ask the same questions for the next dataset.

So you will get one record of the participant in the global survey and 65(?) records for each participant in the second survey.

Of course it is easy to extend.

Here a short (quick and dirty) video

www.youtube.com/embed/MObiXhVLODw

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 5 months ago #168852 by holch
Looks good. But from what I understood, the clients could have anything from 1-90 of those codes, how would you limit this per client and how do you pipe in the document (e.g. CustomerAData XX3)? Would this all be in the token table? And how would this be included in the following surveys?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 5 months ago - 6 years 5 months ago #168854 by Joffm

client A who has codes from "CustomerAData XX1" to "CustomerAData XX65", or in other words, this client A has to go through the loop 65 times


I just start with dataset number (dsno) = 1 and in each loop I increase this dataset number.
In the question text I just have a micro-tayloring:
{if(dsno==1,"The name of the first dataset",if(dsno==2,"The name of the second dataset",if(dsno==3,"The name of the third dataset",....
Constantin will know the real names.

And the termination?
At the moment I add to the end-url only "token" and "dsno". You could add the amount of datasets (65, 87, 23,...) and then either clear the end-url, so that the survey doesn't call itself anymore or use a quota (not sure about it).

If you play around with the dsno,
1st customer start with 1
2nd customer with 101,
3rd customer with 201,...
you can have a well defined relation between customer and dataset name.
The start you can store in the participants table as ATTRIBUTE.

And the termination could be the same (dsno modulo 100) = max amount.

When I am finished I will provide the surveys *.lss


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 5 months ago by Joffm.
The topic has been locked.
  • ConstantinTU
  • ConstantinTU's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 5 months ago #168860 by ConstantinTU
Awesome, I really like the idea Joffm.
I will need to play around a bit to really understand the full potential of this.
Thanks a lot

Best,
Constantin
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 5 months ago - 6 years 5 months ago #168886 by Joffm
Hi, now I included the termination.

1. Set a hidden single punch question (I called it QQuota) with three answer options:
0 = okay
1 = termination (all datasets were answered)
2 = no rights (somebody tried to open the questionnaire directly)

2.a. In an equation set
{QQuota=if(intval(dmax) lt intval(dsno),1,0)}
if the amount of datasets is smaller then the actual dataset number, set the value to "1" otherwise to "0".

2.b. If there is none of the expected parameters in the survey link, like dsno, token, dmax, set the value of the question to "2".

Then there are two quotas to screen out the participants which have
the value "1" with an appealing text like "Thank you very much; these were all our questions."
the value "2" with a text like "You have no rights to enter the survey"

Otherwise you can direct to a third part of the survey with some general questions at the end.

Something else:
Till now I displayed the name of the dataset by micro-tayloring (see my last post).

There is an other option.
Create a question "huge text". (I called it "DocuName")
As default answer, enter your datasets (with a well defined start to be able to do a search):
CC000101This is dataset 1 of customer 1
CC000102This is dataset 2 of customer 1
CC000103This is dataset 3 of customer 1
...
CC012326This is dataset 26 of customer 123
CC012327This is dataset 27 of customer 123
CC012328This is dataset 28 of customer 123

All texts have the same length, fill with blanks (easily done in EXCEL)

Now knowing the customers number and the actual dsno, you cut the name out of this text.
1st equation (called eqNeedle) to create the "needle", the correct CC-value.

{join("CC",if(strlen(custno)==1,"000",if(strlen(custno)==2,"00",if(strlen(custno)==3,"0",""))),custno,if(strlen(dsno)==1,"0",""),dsno)}

The if-statements to leftpad with "0" only because the function pad doesn't work for leftpadding.

2nd equation to cut the string:
{trim(substr(DocuName,8+stripos(DocuName,eqNeedle),50))}
You see, there is always a fixed length of "50", and the blanks at the right are removed by "trim".

If somebody thinks it is of use...

By the way: In the video I changed the wording of the "submit"-Button to "Next" as described here
www.limesurvey.org/forum/can-i-do-this-w...utton-to-next-button

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 5 months ago by Joffm.
The topic has been locked.
  • ConstantinTU
  • ConstantinTU's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 5 months ago #169102 by ConstantinTU
Hi,

thank you very much again, so I got most of survey to work. The only problem I have is the termination with the quota, I just can't get it to terminate. Joffm would you mind sharing your *.lss so I could check what I'm doing wrong.
Thank you

Best,
Constantin
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 5 months ago #169103 by holch
Quotas only work in activated surveys...

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • ConstantinTU
  • ConstantinTU's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 5 months ago #169104 by ConstantinTU

holch wrote: Quotas only work in activated surveys...


Yeah, I tried but still no termination.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 5 months ago #169106 by holch
Well, with the provided information there is very little we can do. You would have to provide a test survey with the respective behavior and explain when the quotas should close the survey for us to have a more detailed look.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • ConstantinTU
  • ConstantinTU's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 5 months ago #169303 by ConstantinTU
Figured it out had a bug in my equation.
Thanks again for your help. This really helped me out.
Best,
Constantin
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 5 months ago #169361 by Joffm
Hi, Constantin,
sorry, but I was busy during the last week.
Therefore no time to read or write here.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose