- Posts: 56
- Thank you received: 0
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
- Topic Author
- Offline
- Senior Member
Less
More
3 years 6 months ago #206894
by torilee93
Can we change the default blank answer "NAN"? was created 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
I thought it should show "---" if it is empty.
Thanks for your help!
- Tori
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
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
3 years 6 months ago #206895
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 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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 56
- Thank you received: 0
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
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
3 years 6 months ago #206917
by DenisChenu
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.
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 ?
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
3 years 6 months ago - 3 years 6 months ago #206920
by DenisChenu
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.
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.
Attachments:
Last edit: 3 years 6 months ago by DenisChenu.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
3 years 6 months ago - 3 years 6 months ago #206921
by DenisChenu
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.
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>
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.
Attachments:
Last edit: 3 years 6 months ago by DenisChenu.
The following user(s) said Thank You: torilee93
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12922
- Thank you received: 3977
3 years 6 months ago #206924
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Can we change the default blank answer "NAN"?
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.
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
3 years 6 months ago #206926
by DenisChenu
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.
Replied by DenisChenu on topic Can we change the default blank answer "NAN"?
An i use .NAOKJoffm wrote: Oh, Denis was a bit faster.
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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 56
- Thank you received: 0
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
Thank you so much for helping me out once again! That worked for me.
- Tori
The topic has been locked.
- torilee93
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 56
- Thank you received: 0
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
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.