- Posts: 8
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Variable always +1
- Marv12
- Topic Author
- Offline
- New Member
Less
More
6 years 6 months ago #158451
by Marv12
Variable always +1 was created by Marv12
Hi,
is it possible to define a variable in the beginning with the value "0" and then after each question add "1" to this variable?
is it possible to define a variable in the beginning with the value "0" and then after each question add "1" to this variable?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
6 years 6 months ago #158463
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Variable always +1
You could put an equation type question in the first group with a value of 0 and then increment it with equation questions in every subsequent group, using the assignment operator.
manual.limesurvey.org/Expression_Manager..._Assignment_Operator
manual.limesurvey.org/Expression_Manager..._Assignment_Operator
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13907
- Thank you received: 2546
6 years 6 months ago #158493
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 Variable always +1
I don't like to use a Equation question type for the counter, prefer an numeric questioin type with default value 0
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.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
6 years 6 months ago #158509
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Variable always +1
Why?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13907
- Thank you received: 2546
6 years 6 months ago #158511
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 Variable always +1
Because, for example : if you have index activated : Equation can be resetted when submit.
In fact Equation is resetted each time "step" is done (move previous for example).
With a default value : it's set only if it's null or not set.
I think reload survey can reset the value too (to be tested).
In fact Equation is resetted each time "step" is done (move previous for example).
With a default value : it's set only if it's null or not set.
I think reload survey can reset the value too (to be tested).
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.