Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Empty values sometimes string, sometimes 0

  • michael77
  • michael77's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206037 by michael77
Hi,

we are currently running a survey with different question groups (shown group by group). In one of these groups we have an array type question (numbers). Let's call this question Q1. All the questions are mandatory, so the participant should not be able to continue without filling all fields. In another group we also use an array type question (text). Let's call this question Q2.

When exporting the answers to Excel (completed entries), empty values are sometimes shown as empty strings and sometimes they are shown as zeros (also strings). But interestingly this behavior is not consistent among different participants. There are participants (rows in the data) where empty entries are shown as zeros in Q1 but as empty strings in Q2. And there are participants where the opposite is the case: in Q1 empty answers are shown as empty strings and as 0s in Q2.

In some cases it was obivously also possible to continue to the next question group without filling all the fields, although this should not be possible at all since the questions are mandatory.

My question is now, what can cause that difference in storing data between participants?

Unfortunately I am not able to reproduce that behavior. The only way I am able to get empty strings in the data is by not filling out all questions array fields and clicking continue in Q1. But I am not able to continue. And as said, in our data we have such entries but the participants were able to complete the survey.

Some details about our system:

LimeSurvey version: 2.50+ Build 160606
PHP version: 7.0.27
MySQL version: MariaDB 10.3.13 (mysqlnd 5.0.12-dev - 20150407)
Server: Redhat Linux
Browser: Firefox (one participant told us that she used Firefox, but I am also using Firefox and can't reproduce the problem).

We are also using a plugin (arrayTextAdapt) in Q2 to get drop down list for the answer choices. The answer values used are either empty string (nothing selected) or the codes 1 (for Yes) and 0 for (No).

In Q2 we are also using a bit of JavaScript code to automatically prefill columns in the array based on the choice in the first column (see attached). The script has been added in source code view of the question. And yes, this script is setting some values to empty, but this should happen in a consistent way among participants.

And yes, I know: we should probably update our LimeSurvey installation and I am already planning that. But that's another issue since we have hundreds of active surveys which can not be migrated that easily.


Best,
Michael
Attachments:
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206039 by Joffm
Replied by Joffm on topic Empty values sometimes string, sometimes 0
Hi, Michael,

could you please send a LSS export of these relevant questions (copy the survey and remove everything not related to this issue)

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206040 by DenisChenu
Replied by DenisChenu on topic Empty values sometimes string, sometimes 0
> LimeSurvey version: 2.50+ Build 160606

Issue in this version.

And 0 is not empty for limesurey. It's an answer.

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 following user(s) said Thank You: michael77
The topic has been locked.
  • michael77
  • michael77's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206042 by michael77
Replied by michael77 on topic Empty values sometimes string, sometimes 0
Thank you for the prompt response. Is there some place where I can read more about that issue? Maybe I am then finally able to reproduce it.

And yes, I am aware that 0 is a an answer. But how can it happen that participants are able to continue even without filling some question parts? Or is this also related to the issue you mentioned?
The topic has been locked.
  • michael77
  • michael77's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206045 by michael77
Replied by michael77 on topic Empty values sometimes string, sometimes 0
Attached you find the survey structure containing just one question where the problem appears.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206056 by DenisChenu
Replied by DenisChenu on topic Empty values sometimes string, sometimes 0

michael77 wrote: Thank you for the prompt response. Is there some place where I can read more about that issue? Maybe I am then finally able to reproduce it.

It's a 4 years old version, i didn't know all history (with time) of limesurvey since 4 years

You can check the commits : github.com/LimeSurvey/LimeSurvey/commits/3.x-LTS

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.
  • michael77
  • michael77's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206060 by michael77
Replied by michael77 on topic Empty values sometimes string, sometimes 0

DenisChenu wrote:

michael77 wrote: Thank you for the prompt response. Is there some place where I can read more about that issue? Maybe I am then finally able to reproduce it.

It's a 4 years old version, i didn't know all history (with time) of limesurvey since 4 years

You can check the commits : github.com/LimeSurvey/LimeSurvey/commits/3.x-LTS


Ok, thanks.
The topic has been locked.
  • holch
  • holch's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206088 by holch
Replied by holch on topic Empty values sometimes string, sometimes 0
I don't think it makes sense to try and bug fix a version that is basically the very first release of one of the worst releases Limesurvey ever had (in the months after this release there were almost daily new releases to fix bugs). I can't believe you are still using this version. This version of LS is full of error and bugs, you should run into much bigger problems than this with this version.

LimeSurvey version: 2.50+ Build 160606

I wouldn't even want to use the latest version of this branch. Go for the latest version of LS 3.x LTS (do NOT go with Limesurvey LS 4.x, it is basically the same case as LS 2.50+, still too many bugs to be considered stable. History repeats itself if you don't learn from your mistakes in the past...).

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
2 years 9 months ago - 2 years 9 months ago #217852 by kelsimon43
Replied by kelsimon43 on topic Empty values sometimes string, sometimes 0
Currently I am working on spring(MVC) web app, I have observed something strange while validating entity class fields in my controller. Whenever i try to do validation after each form submittion i get confused about the value that is stored in entity class fields.

Example, following is the code snippet i use for validating one of thefield. It works fine, but sometimes not. Reason i found is sometime there is Null value set and sometime Empty value is set for the same field.

if(entity.getWhoBookedIt().equals("")){
bindingResult.rejectValue("whoBookedIt", "NotEmpty.java.lang.String", null, null);
}
I don't understand why this is happening?, can anybody explain the reason for this?
Last edit: 2 years 9 months ago by kelsimon43.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #217855 by DenisChenu
Replied by DenisChenu on topic Empty values sometimes string, sometimes 0

I wouldn't even want to use the latest version of this branch. Go for the latest version of LS 3.x LTS (do NOT go with Limesurvey LS 4.x, it is basically the same case as LS 2.50+, still too many bugs to be considered stable. History repeats itself if you don't learn from your mistakes in the past...).
 
No : Template for 2.50/2.73 are not 3.X compatible.
github.com/SondagesPro/LimeSurvey-Sondag...ree/2.73/application

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.
  • holch
  • holch's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #217866 by holch
Replied by holch on topic Empty values sometimes string, sometimes 0
I was saying that LS 4 (back then) was the same case of "too soon, too early", like with 2.5x. I was NOT referring to the templates being the same. I was just referring to the decision to release the version as "stable", when it clearly was not.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #217874 by DenisChenu
Replied by DenisChenu on topic Empty values sometimes string, sometimes 0
«Go for the latest version of LS 3.x LTS» must be done with care :)

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.

Lime-years ahead

Online-surveys for every purse and purpose