- Posts: 40
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to create a dummy question that can store number of repetition
- mnelson
- Topic Author
- Offline
- Senior Member
Less
More
2 years 11 months ago #215164
by mnelson
How to create a dummy question that can store number of repetition was created by mnelson
Hi Team,
Im creating a survey which has 10 occasions with each occasion needs to be asked the same questions(5 questions in total).Instead of reapeating this questions,I just wanted to create 1 round of the 5 questions which will be used.My issue arises on how I can create a dummy question which will store and update the number of occassion.
This is how I would like it to work,at the end of the survey,the end url will have a condition to check if all occasions mentioned by the respondent are answered and also to update the dummy question indicating current number of occassions answered.
Any one with an idea on how I can best execute this is welcomed.Thanks.
LimeSurvey
Version 3.25.20
Im creating a survey which has 10 occasions with each occasion needs to be asked the same questions(5 questions in total).Instead of reapeating this questions,I just wanted to create 1 round of the 5 questions which will be used.My issue arises on how I can create a dummy question which will store and update the number of occassion.
This is how I would like it to work,at the end of the survey,the end url will have a condition to check if all occasions mentioned by the respondent are answered and also to update the dummy question indicating current number of occassions answered.
Any one with an idea on how I can best execute this is welcomed.Thanks.
LimeSurvey
Version 3.25.20
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12791
- Thank you received: 3941
2 years 11 months ago #215168
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic How to create a dummy question that can store number of repetition
So you want to link to the survey itself by adding a parameter that contains the number of answered occasions?
Read about end-url and url-fields [url] manual.limesurvey.org/URL_fields [/url]
I do not recommend this.
If it is a token-based survey you could use the plugin "updateTokenByResponde"
[url] gitlab.com/SondagesPro/TokenManagement/updateTokenByResponse [/url]
You should send a lss export of your survey skeleton.
So we have a better idea.
Joffm
Read about end-url and url-fields [url] manual.limesurvey.org/URL_fields [/url]
I do not recommend this.
If it is a token-based survey you could use the plugin "updateTokenByResponde"
[url] gitlab.com/SondagesPro/TokenManagement/updateTokenByResponse [/url]
You should send a lss export of your survey skeleton.
So we have a better idea.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- mnelson
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 40
- Thank you received: 1
2 years 11 months ago #215173
by mnelson
Replied by mnelson on topic How to create a dummy question that can store number of repetition
Below attached is the lss file.The group I want to repeat is GROUP OCC(Last one) according to the number of occassions in B6.
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12791
- Thank you received: 3941
2 years 11 months ago #215202
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic How to create a dummy question that can store number of repetition
Hi,
it IS possiible to do a second survey the is called several times.
But what with all these parameters in your end-url.
For this second survey you only need the number of occasions, the times, the name of the child, and either the RID or the SAVEDID of the first survey.
I will send an example later.
But did you consider this?
In my opinion you could shorten the whoile survey with this array.
it IS possiible to do a second survey the is called several times.
But what with all these parameters in your end-url.
For this second survey you only need the number of occasions, the times, the name of the child, and either the RID or the SAVEDID of the first survey.
I will send an example later.
But did you consider this?
In my opinion you could shorten the whoile survey with this array.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12791
- Thank you received: 3941
2 years 11 months ago #215253
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic How to create a dummy question that can store number of repetition
Hi,
here is a rough example how to "loop" through your occasions.
You use this end-url in your main survey
I changed the equations to OCC1 with {B7_1_1.shown+if(B7_1_1 >0,"AM","PM")}
And the STID (stored ID to follow the respondent) you may use eiter the LS {SAVEDID} or your {RID}
Todo:
1. You may simulate the array filter of QB3 by adding a parameter
QB3={join("#",if(1*QB3_1=="Y","1","0"),ii(QB3_2=="Y","1","0"),if(QB_3=="Y","1","0"),...)}
You get a string of 50 digits like "0011010000010001..."
and in the loop you may set the subquestion relevance of B8A like
B8a_1 Breast Milk : substr(QB3,1,1)=="1"
B8a_2 ... : substr(QB3,2,1)=="1"
B8a_3 ... : substr(QB3,3,1)=="1"
...
2. The "Others" of QB3: Either you transfer them in the url be some more parameters, or you ask each time in the loop.
Well, as you see it is possible.
But as I do not know what for you add more or less all questions in the end-url of your survey,... These will be lost.
Joffm
here is a rough example how to "loop" through your occasions.
You use this end-url in your main survey
www.myserver.com/lime3/index.php/123456?...ID}&loop=1&newtest=Y
I changed the equations to OCC1 with {B7_1_1.shown+if(B7_1_1 >0,"AM","PM")}
And the STID (stored ID to follow the respondent) you may use eiter the LS {SAVEDID} or your {RID}
Todo:
1. You may simulate the array filter of QB3 by adding a parameter
QB3={join("#",if(1*QB3_1=="Y","1","0"),ii(QB3_2=="Y","1","0"),if(QB_3=="Y","1","0"),...)}
You get a string of 50 digits like "0011010000010001..."
and in the loop you may set the subquestion relevance of B8A like
B8a_1 Breast Milk : substr(QB3,1,1)=="1"
B8a_2 ... : substr(QB3,2,1)=="1"
B8a_3 ... : substr(QB3,3,1)=="1"
...
2. The "Others" of QB3: Either you transfer them in the url be some more parameters, or you ask each time in the loop.
Well, as you see it is possible.
But as I do not know what for you add more or less all questions in the end-url of your survey,... These will be lost.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
2 years 11 months ago #215256
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic How to create a dummy question that can store number of repetition
I know i need to make some documentation but :
See : demo.sondages.pro/896317#
Usage of gitlab.com/SondagesPro/QuestionSettingsT...ionSpreadsheetSurvey i think it work alone (to be confirmed).
Need 2 survey : SpreadSheed part are a survey at own.
See : demo.sondages.pro/896317#
Usage of gitlab.com/SondagesPro/QuestionSettingsT...ionSpreadsheetSurvey i think it work alone (to be confirmed).
Need 2 survey : SpreadSheed part are a survey at own.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12791
- Thank you received: 3941
2 years 11 months ago #215300
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic How to create a dummy question that can store number of repetition
Hi,
I saw the end-url was not readable well
You may try with
@Denis: Regarding the SpreadsheetSurvey:
I got my first rough example to run. Very rough.
Some more documentation would be appresiated.
Joffm
I saw the end-url was not readable well
Code:
http://www.myserver.com/lime3/index.php/123456?lang=en&NAME={B0}&O_1={OCC1}&O_2={OCC2}&O_3={OCC3}&O_4={OCC4}&O_5={OCC5}&O_6={OCC6}&O_7={OCC7}&O_8={OCC8}&O_9={OCC9}&O_10={OCC10}&STID={SAVEDID}&loop=1&newtest=Y
You may try with
Code:
http://www.myserver.com/lime3/index.php/123456?lang=en&NAME=Benni&O_1=5AM&O_2=10AM&O_3=4PM&O_4=&O_5=&O_6=&O_7=&O_8=&O_9=&O_10=&STID=123&loop=1&newtest=Y
@Denis: Regarding the SpreadsheetSurvey:
I got my first rough example to run. Very rough.
Some more documentation would be appresiated.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- mnelson
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 40
- Thank you received: 1
2 years 11 months ago #215303
by mnelson
Replied by mnelson on topic How to create a dummy question that can store number of repetition
Hi,
How did you manage come up with this in 1 array ?
How did you manage come up with this in 1 array ?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
2 years 11 months ago #215309
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic How to create a dummy question that can store number of repetition
Maybe more easy with some sample survey ?
demo.sondages.pro/admin/survey/sa/listsu...e=&gsid=4&yt0=Search
demo.sondages.pro/admin/survey/sa/listsu...e=&gsid=4&yt0=Search
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.