- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Half and half
- SnowyEgret
- Topic Author
- Offline
- New Member
Less
More
9 years 4 months ago #114108
by SnowyEgret
Half and half was created by SnowyEgret
I have two groups of questions. The first I would like to present to odd numbered respondents, the second to the even numbered respondents. How can I do this with LimeSurvey?
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1223
- Thank you received: 351
9 years 4 months ago #114116
by Ben_V
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic Half and half
Hi,
you can use the group relevance equation field to set a condition on the last number of the respondant ID
Obviously, your survey must be activated
for 0, 2, 4 etc.
for 1, 3 , 5 etc
Note: {substr(SAVEDID, -1)} retrieve the last character of {SAVEDID}
.
you can use the group relevance equation field to set a condition on the last number of the respondant ID
Obviously, your survey must be activated
for 0, 2, 4 etc.
Code:
((substr(SAVEDID, -1) == "0") or (substr(SAVEDID, -1) == "2") or (substr(SAVEDID, -1) == "4") or (substr(SAVEDID, -1) == "6") or (substr(SAVEDID, -1) == "8"))
for 1, 3 , 5 etc
Code:
((substr(SAVEDID, -1) == "1") or (substr(SAVEDID, -1) == "3") or (substr(SAVEDID, -1) == "5") or (substr(SAVEDID, -1) == "7") or (substr(SAVEDID, -1) == "9"))
Note: {substr(SAVEDID, -1)} retrieve the last character of {SAVEDID}
.
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: SnowyEgret
The topic has been locked.
- SnowyEgret
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
9 years 4 months ago #114175
by SnowyEgret
Replied by SnowyEgret on topic Half and half
Thanks Ben this will work fine for me.
Just out of interest, could I set up a counter of type integer in a hidden question at the top of the survey which I would be able access globally and do modular arithmetic on?
Just out of interest, could I set up a counter of type integer in a hidden question at the top of the survey which I would be able access globally and do modular arithmetic on?
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1223
- Thank you received: 351
9 years 4 months ago #114178
by Ben_V
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic Half and half
However I don't understand well your question... i think that you can achieve almost everything if you have an extensive look at all available
EM functions
.
For example I recommend you this old great post ...
For example I recommend you this old great post ...
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
9 years 4 months ago #114201
by Mazi
Only the current data set ID ({SAVEDID}) can be used for that.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic Half and half
If by counter you mean a counter for counting the current number of completed data sets, then this isn't possible because the Limesurvey placeholders can only refer to data of the current survey session.SnowyEgret wrote: Thanks Ben this will work fine for me.
Just out of interest, could I set up a counter of type integer in a hidden question at the top of the survey which I would be able access globally and do modular arithmetic on?
Only the current data set ID ({SAVEDID}) can be used for that.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The following user(s) said Thank You: SnowyEgret
The topic has been locked.