Welcome to the LimeSurvey Community Forum

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

Import a Drop-Down-List values from a file

  • FayezDebbabi
  • FayezDebbabi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 11 months ago #152380 by FayezDebbabi
Import a Drop-Down-List values from a file was created by FayezDebbabi
Hello everyone,
I am trying to add an attribute for a participant, that should take a value from a Drop Down List, the problem is that i am doing it manually ( I am adding the different possible values manually one after the other, which is not a correct procedure when having thousands and millions of values to add), so I was wondering how to add these values from a file (.CSV file or any type ).
I am sending as an attachment a screen-shot in order to clarify the situation.
Attachments:
The topic has been locked.
More
6 years 11 months ago #152388 by Ben_V
Replied by Ben_V on topic Import a Drop-Down-List values from a file

FayezDebbabi wrote: ...when having thousands and millions of values to add.



Dropdown question type is not designed for huge lists (hundreds of items). In my opinion the classic list with all countries is clearly the limit in usuability terms. A better way is using cascading combos like:
continents/areas > countries ( > provinces/states > towns)

Maybe you should prefer a single text field with a suggest/autocomplete solution. It's a valid solution for thousands of items defined elsewhere in a csv file or additional table.


BTW I wonder if you can describe me the required technical environment handling casv files containing millions of lines.

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 following user(s) said Thank You: FayezDebbabi
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 11 months ago #152404 by holch
Replied by holch on topic Import a Drop-Down-List values from a file
I agree with Ben in general.

To add a long list of items to a question you can use the "quick add" feature which you can find at the stage where you add the answer options or the subquestions. If you format it correctly in Excel you can even copy your own answer codes / subquestion codes together with the item. Just have the codes in the first column of your excel file and the items in the second, then copy all and insert it into the quick add field. I don't know how many items this approach can handle, but so far everything that I threw at it worked.

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.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 11 months ago #152405 by holch
Replied by holch on topic Import a Drop-Down-List values from a file
Sorry, just saw your screenshot now. You are not talking about questions, but attributes to the participant list. So forget my answer above.

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

The following user(s) said Thank You: FayezDebbabi
The topic has been locked.
  • FayezDebbabi
  • FayezDebbabi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 11 months ago #152420 by FayezDebbabi
Replied by FayezDebbabi on topic Import a Drop-Down-List values from a file
Personally I still didn't enter in the professional world (still an engineering student :) ), but in my project, for example, a participant is a patient (doctor<->patient relation), and a doctor should choose the the disease for example of his patient.
I may be exaggerating a little bit, but actually in my project, as I mentioned, the list that can be long enough (2000 elements and more, here is a link to get an idea about it : www.orpha.net/consor4.01/www/cgi-bin/Dis...arch_List.php?lng=FR ).
But a single text field with a suggest/autocomplete is a very good solution in the case of my situation, so do you have a link, on the manual part that mentions this? because I can't find anywhere how to do it :/ .
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 11 months ago #152421 by holch
Replied by holch on topic Import a Drop-Down-List values from a file
First of all you should really clarify if you are talking about a question in a questionnaire or if this is about participant database or token table attributes. In the later cases I don't think there is an option to change the type of entry. Only if this is a question in a questionnaire.

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

The following user(s) said Thank You: FayezDebbabi
The topic has been locked.
  • FayezDebbabi
  • FayezDebbabi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 11 months ago #152422 by FayezDebbabi
Replied by FayezDebbabi on topic Import a Drop-Down-List values from a file
Well, I am not talking about questions. I am talking about a participant attribute information like name, email,... but in this particular attribute, there are different possibilities (which why I thought about a drop-down-list, that contains values added automatically from importing a file or other :/ )
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 11 months ago #152424 by holch
Replied by holch on topic Import a Drop-Down-List values from a file
OK, in the central participant database or the token tables I don't see any way to implement a autocompletion field. However, I don't think it makes much sense anyway. Because the doctor will not be the one who is entering the data into Limesurvey anyway, right?
You can always upload token tables or participants to the central participant database via CSV file. Or I really don't get the problem...

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.
More
6 years 11 months ago #152441 by Ben_V
Replied by Ben_V on topic Import a Drop-Down-List values from a file
Basically there is always a possibility to add an autocomplete function to a text field (find the good selector + ajax call + csv ). LS recent versions are allowing admin (back office) customization (including javascript extra files), so it's probably doable to adapt some CPD fields, without loosing those changes after any LS major update...

BTW you have to be very careful if you are planning to associate an email adresse or any personnal identifier with diseases. This is clearly against EU & US PHI laws if you are not working in a specific secured environment. ;)

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.
  • FayezDebbabi
  • FayezDebbabi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 11 months ago #152455 by FayezDebbabi
Replied by FayezDebbabi on topic Import a Drop-Down-List values from a file
Well thank you for your response, it is true that collecting personal data, especially medical information about patients should be made and deployed in a very secure environment and even if it is secure, we should get the permission from specific organisations to have the right to do this, but for now let's say it is for test issues.
Thank you for the remark :)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose