Welcome to the LimeSurvey Community Forum

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

Can we change the default blank answer "NAN"?

  • torilee93
  • torilee93's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago #206894 by torilee93
Hello,

I have two fields that calculate PV and BV based on a dog's weight.
However, I've noticed when I leave out the dog's weight the automatic default answer for PV and BV is "NAN" in the PDF report.
Is there a way to change this? In the summary I have the code
Code:
Dog Weight: {if(is_empty(dog.shown),"---",dog.shown)}
 
PV: {if(is_empty(PV.shown),"---",PV.shown)}
 
BV: {if(is_empty(BV.shown),"---",BV.shown)}

I thought it should show "---" if it is empty.

Thanks for your help!

- Tori
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206895 by tpartner
Replied by tpartner on topic Can we change the default blank answer "NAN"?
Remove the .shown extensions.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • torilee93
  • torilee93's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago #206914 by torilee93
Replied by torilee93 on topic Can we change the default blank answer "NAN"?
Hi @tpartner
Thank you for your suggestion. I removed the .shown extension off of PV so it looks like this {if(is_empty(PV),"---",PV)}
but I'm still getting the NAN default

-Tori
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206917 by DenisChenu
Replied by DenisChenu on topic Can we change the default blank answer "NAN"?
When you talf for PDF report : you mean the print PDF version ?
Or the export to PDF ?

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.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago - 3 years 6 months ago #206920 by DenisChenu
Replied by DenisChenu on topic Can we change the default blank answer "NAN"?
Oh no, my pdfReport plugin …Seems to work on last LimeSurvey 3.X version. What is your version ?Else : try with .NAOK and not shown

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.
Last edit: 3 years 6 months ago by DenisChenu.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago - 3 years 6 months ago #206921 by DenisChenu
Replied by DenisChenu on topic Can we change the default blank answer "NAN"?
OK,

Got it : you must fix PV and BV not after …


<p><strong>Plasma Volume:</strong> {if(is_empty(dog.NAOK),'',dog.NAOK/0.025)}</p>

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.
Last edit: 3 years 6 months ago by DenisChenu.
The following user(s) said Thank You: torilee93
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206924 by Joffm
Your error is here

Plasma Volume: {dog/0.025}

Therefore PV never is empty.
You have to correct this like {if(is_empty(dog),"",dog/0.025)}


Joffm

Oh, Denis was a bit faster.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: torilee93
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206926 by DenisChenu
Replied by DenisChenu on topic Can we change the default blank answer "NAN"?

Joffm wrote: Oh, Denis was a bit faster.

An i use .NAOK :P

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: torilee93
The topic has been locked.
  • torilee93
  • torilee93's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago #206932 by torilee93
Replied by torilee93 on topic Can we change the default blank answer "NAN"?
@DenisChenu

Thank you so much for helping me out once again! That worked for me.
:)

- Tori
The topic has been locked.
  • torilee93
  • torilee93's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago #206933 by torilee93
Replied by torilee93 on topic Can we change the default blank answer "NAN"?
@Joffm

Thank you for always helping me on all my forum posts.
I really appreciate how you break down your answers and explain it to me.
:)

- Tori
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose