- Posts: 73
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Lss file import - how to keep IDs while importing?
- arunicbe
- Topic Author
- Offline
- Senior Member
Less
More
5 years 1 month ago #182655
by arunicbe
Lss file import - how to keep IDs while importing? was created by arunicbe
I am developing surveys in my wamp server and import the surveys in the live server through .lss files.
While importing, the IDs of the question/ group changed automatically. I have couple of scripts to generate reports based on the question/responses. The scripts refer the questions by ID.
How do I keep the IDs same so it does not affect the scripts?
While importing, the IDs of the question/ group changed automatically. I have couple of scripts to generate reports based on the question/responses. The scripts refer the questions by ID.
How do I keep the IDs same so it does not affect the scripts?
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12996
- Thank you received: 3999
5 years 1 month ago - 5 years 1 month ago #182672
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Lss file import - how to keep IDs while importing?
Hi,
As you might know the GID (in lime_groups) and QID (in lime_questions) are implemented as "auto increment".
If they were not A.I. and stayed the same as in an imported *.lss, you'd get a lot of key violations (two groups, same GID, etc.)
Joffm
Please, do not try.How do I keep the IDs same so it does not affect the scripts?
As you might know the GID (in lime_groups) and QID (in lime_questions) are implemented as "auto increment".
If they were not A.I. and stayed the same as in an imported *.lss, you'd get a lot of key violations (two groups, same GID, etc.)
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 years 1 month ago by Joffm.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10115
- Thank you received: 3597
5 years 1 month ago #182674
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 Lss file import - how to keep IDs while importing?
I'm assuming these scripts are not in the question source, otherwise you could use {QID}.
A workaround would be to assign CSS classes to the questions and have your scripts target those class names.
A workaround would be to assign CSS classes to the questions and have your scripts target those class names.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.