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
  • arunicbe's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 11 months ago #182655 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?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 11 months ago - 4 years 11 months ago #182672 by Joffm
Hi,

How do I keep the IDs same so it does not affect the scripts?

Please, do not try.

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: 4 years 11 months ago by Joffm.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 11 months ago #182674 by tpartner
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.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose