Welcome to the LimeSurvey Community Forum

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

Survey reports NAN

  • Fgonc124
  • Fgonc124's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #221176 by Fgonc124
Survey reports NAN was created by Fgonc124
I created a survey to calculate BMI.
If I run the survey inside Limesurvey it works fine.

If run the survey outside I get an error on the values I introduced.

The first time I run the survey everything works fine. If I refresh the page I get NAN error after I introduce values

I teste in Chrome and Edge.

WHy do I get those NAN errors?

I attached the survey
 
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #221183 by Joffm
Replied by Joffm on topic Survey reports NAN
Hi,
I can't reproduce this error. I get the "silly" string that you produce, (5.1.15)
 

 

And this is obviously "Not A Number"
In your equation there should only be one - the final - calculation.
{Peso*100*100/((Altura*Altura))}

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • Fgonc124
  • Fgonc124's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #221186 by Fgonc124
Replied by Fgonc124 on topic Survey reports NAN
Did you look inside the survey? It looks like you didn't
Those are 3 fields. I tried to see if any of fields had errors. They dont as you can see. So the calculation should work.

It works the first time I run , but if I refresh the page I get a NAN Error.
The topic has been locked.
  • Fgonc124
  • Fgonc124's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #221187 by Fgonc124
Replied by Fgonc124 on topic Survey reports NAN
If run the survey after I activated, the first time everything works fine. If I refresh the page I get the error 
I divided the the equation in 3 pireces to see if any of the numbers had errors. After refresh all those pieces report NAN.

The problem was the same before I separeted in 3 pieces. You can see the problem from pictures attached.

I the same error from an example provided in  www.limesurvey.org/manual/ExpressionScri...eatures_Demonstrated
Thanks

     
 
The topic has been locked.
  • Fgonc124
  • Fgonc124's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #221188 by Fgonc124
Replied by Fgonc124 on topic Survey reports NAN
I get the same error on Windows 7
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago - 3 years 1 month ago #221213 by holch
Replied by holch on topic Survey reports NAN
The error has nothing to do with your operating system.

If I run the survey inside Limesurvey it works fine.

If run the survey outside I get an error on the values I introduced.


First of all, what do you mean with "inside" and "outside"? You can't run a Limesurvey survey "outside" of Limesurvey...

And like always, what version of Limesurvey are we talking about? This is much more relevant that the version of Windows.

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

Last edit: 3 years 1 month ago by holch.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #221215 by holch
Replied by holch on topic Survey reports NAN
OK, had to learn the Version the hard way, because your survey wouldn't import into LS3, so it seems to be LS5.

Imported it, tested it, works just fine. Both in preview mode or when activated (Limesurvey Version 5.1.15+211011).

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.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #221217 by Joffm
Replied by Joffm on topic Survey reports NAN

Did you look inside the survey? It looks like you didn't

Be assured, I did.
I tested it "activated" and "not activated".

I couldn't reproduce your NAN.
And when I refresh the page the "peso" and "altura" questions are set back to their initial values -> empty, and the equation is not shown.

I divided the the equation in 3 pireces to see if any of the numbers had errors.

This you should do better in a question of type "text display".
Questions of type "equation" are used to
  • calculate a value and store it
  • assign values to other questions


@holch, he seems to use a 5.something version.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #221219 by holch
Replied by holch on topic Survey reports NAN

@holch, he seems to use a 5.something version.

As I said, learned it the hard way. ;-)

My suspicion is that it has something to do with "inside" and "outside", whatever that means. Because for me the survey works just fine as well.

I am having a very wild guess now: "Outside" means that the survey is displayed within an iframe on another website...

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.
  • Fgonc124
  • Fgonc124's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #221224 by Fgonc124
Replied by Fgonc124 on topic Survey reports NAN
 

File Attachment:

File Name: LS_TestFG.lss
File Size:28 KB
Hi . Thanks for your help.
By outside I mean when I activate the survey I get alink to share. I use that link.
I tested this in several computers and got always the same error NAN.
I divided the equation just to trying to figure out if any of parts of the equation had a problem.
The first time I the activated version, everything works fine. if I refresh I start getting the NAN error

This survey was working fine last January. A got 1000 answers.
But last week when I looked again , I found the error.

I attatched another survey tha asks for 2 numbers anda multply them. I get the same error as you can from the printscreen after I refresh the page
       
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #221227 by holch
Replied by holch on topic Survey reports NAN
I just tested the activated survey various times with the link and it always calculates the numbers correctly, no NAN. Difficult to say what happens there.

Can you share a link with the active survey so we can test?

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.
  • Fgonc124
  • Fgonc124's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #221228 by Fgonc124
Replied by Fgonc124 on topic Survey reports NAN
Thanks for your Help

Could this be something with javascript?

this is the link I use

fgonc.limequery.com/793754?lang=en
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose