Welcome to the LimeSurvey Community Forum

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

answer code restrictions

  • ployrich
  • ployrich's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 7 months ago #225769 by ployrich
answer code restrictions was created by ployrich
Please help us help you and fill where relevant:
Your LimeSurvey version: 3.27.14
Own server or LimeSurvey hosting: own
Survey theme/template: bootswatch but shouldnt matter in this case
==================
Hi all,
I wanted to create a answer with a 'negative' value so the code would be this: -90.
Do I remember wrong and this was never permitted due to the '-' character? Or is is a bug in the version I am using?

Thank you

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #225770 by holch
Replied by holch on topic answer code restrictions
Why would you want to have an answer code of -90? To be able to calculate with it? Why not using the assessment value for this?

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

Please Log in to join the conversation.

  • ployrich
  • ployrich's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 7 months ago #225771 by ployrich
Replied by ployrich on topic answer code restrictions
So its a no?
Yes we have the convention for nonresponse option to have negative values in the data product in the end. And of course we could do that in post processing, but it would be more convenient to have in consistent in questionaire design -> relevance design and then data.
Aren't assessment values only usable in LimeSurvey as in the wont persist in the DB for exporting?

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #225772 by holch
Replied by holch on topic answer code restrictions
As far as I know, answer codes can only start with a letter or a number.

Good question about the assessment values. Would need to test. Not sure though. Thinking about it, probably not.

If it is not too many of those values, you could use equations to save the value the way you want it.

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

Please Log in to join the conversation.

  • ployrich
  • ployrich's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 7 months ago #225773 by ployrich
Replied by ployrich on topic answer code restrictions
Ok thanks. As its a lot of them I'd rather get to finding a good workaround. I was under the impression that there was only a length restriction and was really surprised when LS told me to match the requested format.
I was aware of the no '-' or '_' for question codes but not for answers. But if you aren't aware that it is a bug I guess I will have to deal with it another way.
 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #225774 by Joffm
Replied by Joffm on topic answer code restrictions
What I tried just now.
Use an equation to reset this codes.
If i initially have this
 

I assigned at the end of the survey in an equation all these codes
{Q1=if(Q1.NAOK==99,-90,Q1.NAOK)}

and got
 

The disadvantage: You do not have labels exporting to SPSS.

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #225786 by tpartner
Replied by tpartner on topic answer code restrictions
In 5.x, you can use negative values as answer codes.

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: holch, Joffm, ployrich

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
2 years 7 months ago #225822 by DenisChenu
Replied by DenisChenu on topic answer code restrictions

In 5.x, you can use negative values as answer codes.
 
Even empty code … or any caracter code … unsure it's not an issue here …
There are no "New feature" about this …
 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
2 years 7 months ago #225824 by DenisChenu
Replied by DenisChenu on topic answer code restrictions

In 5.x, you can use negative values as answer codes.

 
Even empty code … or any caracter code … unsure it's not an issue here …
There are no "New feature" about this …

 
Reported issue : bugs.limesurvey.org/view.php?id=17929
Need some fix or restriction …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose