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
  • jbdotingco's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 2 months ago #193544 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)}
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 months ago #193568 by Joffm

Works fine in new responses but not in those with previous responses as it replaces them.

What do you mean by that?

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
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 months ago #193583 by tpartner
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?

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
  • jbdotingco's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 2 months ago #193585 by jbdotingco
The equation is already working after removing the quotation for 0 in the equation.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose