- Posts: 21
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
How do you "copy"? By an SQL-statement?copying this information directly from my ERP to the lime_answers table in LimeSurvey
<link href="/upload/surveys/123456/files/jquery-ui.min.css" rel="stylesheet" type="text/css" /> <script src="/upload/surveys/123456/files/jquery-ui.min.js"></script> <script src="/upload/surveys/123456/files/jquery.csv.min.js"></script> <script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:complete',function() { var url = "/upload/surveys/123456/files/myCustomers.csv"; var Names = new Array(); $.get(url,function(data){ fullArray = $.csv.toArrays(data); $(fullArray).each(function(i, item){ Names.push(item[0]); }); $("#question{QID} input[type=text]").autocomplete({ minLength: 2, source: Names }); }); }); </script>
Well, it's not exactly a copy it's more like a sync. I thought to just insert all the customers in lime_aswers and make a job to keep the lime_answers updated with my customer db.How do you "copy"? By an SQL-statement?
I consider doing this, but, I'm not sure if this would impact the survey answers later, as I don't exactly know all the limesurvey table relations yet.a. "DELETE from 'lime_answers' WHERE qid=xxx"
I thought of using an autocomplete, but the little I know is that is used on a text field right? I need the answer to be exactly the same as my ERP customer name, and on the dropdown, I also have the customer code from de ERP. If I use a text field and autocomplete, I'll lose those 2 things. Besides, I'll have to keep updating the csv file manually or learn another way to do it.Why not use an "autocomplete" option?
Removing answers directly in the table will have no impact on later responses - it should be the same as removing them in the GUI which is possible, even in activated surveys.ruytterm wrote: Hi!
I consider doing this, but, I'm not sure if this would impact the survey answers later, as I don't exactly know all the limesurvey table relations yet.a. "DELETE from 'lime_answers' WHERE qid=xxx"