- Posts: 7
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
support for an equation for automatic default "0" in numbers (array) question
- jbdotingco
- Topic Author
- Offline
- New Member
Less
More
4 years 2 months ago #193544
by jbdotingco
support for an equation for automatic default "0" in numbers (array) question was created by jbdotingco
I created an equation based also in forum that will create an automatic default 0 in array (numbers) at the start of the survey. Works fine in new responses but not in those with previous responses as it replaces them.
Equation:
{HFHR01_SQ001_SQ001=if(is_empty(HFHR01_SQ001_SQ001.NAOK),"0",HFHR01_SQ001_SQ001.NAOK)} {HFHR01_SQ002_SQ001=if(is_empty(HFHR01_SQ002_SQ001.NAOK),"0",HFHR01_SQ002_SQ001.NAOK)} {HFHR01_SQ003_SQ001=if(is_empty(HFHR01_SQ003_SQ001.NAOK),"0",HFHR01_SQ003_SQ001.NAOK)} {HFHR01_SQ004_SQ001=if(is_empty(HFHR01_SQ004_SQ001.NAOK),"0",HFHR01_SQ004_SQ001.NAOK)} {HFHR01_SQ005_SQ001=if(is_empty(HFHR01_SQ005_SQ001.NAOK),"0",HFHR01_SQ005_SQ001.NAOK)} {HFHR01_SQ006_SQ001=if(is_empty(HFHR01_SQ006_SQ001.NAOK),"0",HFHR01_SQ006_SQ001.NAOK)}
Equation:
{HFHR01_SQ001_SQ001=if(is_empty(HFHR01_SQ001_SQ001.NAOK),"0",HFHR01_SQ001_SQ001.NAOK)} {HFHR01_SQ002_SQ001=if(is_empty(HFHR01_SQ002_SQ001.NAOK),"0",HFHR01_SQ002_SQ001.NAOK)} {HFHR01_SQ003_SQ001=if(is_empty(HFHR01_SQ003_SQ001.NAOK),"0",HFHR01_SQ003_SQ001.NAOK)} {HFHR01_SQ004_SQ001=if(is_empty(HFHR01_SQ004_SQ001.NAOK),"0",HFHR01_SQ004_SQ001.NAOK)} {HFHR01_SQ005_SQ001=if(is_empty(HFHR01_SQ005_SQ001.NAOK),"0",HFHR01_SQ005_SQ001.NAOK)} {HFHR01_SQ006_SQ001=if(is_empty(HFHR01_SQ006_SQ001.NAOK),"0",HFHR01_SQ006_SQ001.NAOK)}
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12921
- Thank you received: 3976
4 years 2 months ago #193568
by Joffm
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic support for an equation for automatic default "0" in numbers (array) question
What do you mean by that?Works fine in new responses but not in those with previous responses as it replaces them.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: jbdotingco
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
4 years 2 months ago #193583
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 support for an equation for automatic default "0" in numbers (array) question
I think jbdotingco means that if a respondent returns to the group the previous answers are reset to 0.
Can you attach a small sample survey containing only the relevant question?
Can you attach a small sample survey containing only the relevant question?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: jbdotingco
The topic has been locked.
- jbdotingco
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
4 years 2 months ago #193585
by jbdotingco
Replied by jbdotingco on topic support for an equation for automatic default "0" in numbers (array) question
The equation is already working after removing the quotation for 0 in the equation.
The topic has been locked.