Welcome to the LimeSurvey Community Forum

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

Code field size in label answers items

  • Deepsoul
  • Deepsoul's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 2 months ago #116857 by Deepsoul
Code field size in label answers items was created by Deepsoul
Hi!

There is any solution for this case:

i have several "answers" like this:

12345678; Irland
23456789; Portugal
3456784; Island
123234565; Brazil


When i do the quick add to create a labels set i get this:

12345; Irland
23456; Portugal
34567; Island
12323; Brazil

Seem llke code field has only 5 charaters. I need at least 7 becaus thats the official code that i need to return.

There is any solution...
Thanks
The topic has been locked.
More
9 years 2 months ago #116865 by Ben_V
Replied by Ben_V on topic Code field size in label answers items
If you have access to the database you can try to edit the lime_answers table (code field)...

Just increase VARCHAR value (5)



Note that I don't know if doing this you will face or not troubles somewhere else.
At least future updates will be more...complicated !
Remember that this will affect all the surveys and you have to check if all is ok if your platform already hosts other questionnaires.

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 2 months ago #116883 by DenisChenu
Replied by DenisChenu on topic Code field size in label answers items
Hi,

Alternative:
-Use 5 character code
- Add an equation to move from 5 character to 7 character code. I think using convert_value EM function can be a good idea.

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.
  • Deepsoul
  • Deepsoul's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 2 months ago #116887 by Deepsoul
Replied by Deepsoul on topic Code field size in label answers items
Thanks for the ideia.

I change the size of the field but i realize that i have other problem: "the size of the text box code field in the form". It has also Only 5 chars of size.

If i change the value of the code in the table for 1111111, it shows correct on the page.

But if i change it... it cast it for 5 chars.

I trying to figure out how i can do a insert query directy to the table and hope that assume the total code value in the anwsers.

regards
The topic has been locked.
  • Deepsoul
  • Deepsoul's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 2 months ago #116888 by Deepsoul
Replied by Deepsoul on topic Code field size in label answers items
hi!

Its was very importante that i keep the original codes.

They are institucional and may identify in many ocasions the oficial identity.

Its was very important to keep this codes.

I just can give them a order number in a excel file. But i need to give always the relation excel file to any one use it and make it oficial.

regards
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose