Welcome, Guest
Username: Password: Remember me

TOPIC: LSS import: GIDs & QIDs not as in LSS file

LSS import: GIDs & QIDs not as in LSS file 3 years 3 months ago #54834

  • bdizzle
  • bdizzle's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Thank you received: 1
  • Karma: 0
Hi,

this is related to this question in the French forum.

I created a survey and added some JavaScript to those questions, based on this workaround for the random choice of questions.

That LSS file specifies, among many other things, the survey ID, as well as the IDs of groups and questions.
When I export my survey as an LSS file, delete the existing survey, and reimport it, only the survey ID is untouched. All other IDs have changed.

This means that my JavaScript logic must be updated after the import, to reflect the new GIDs and QIDs.
Is this a bug, a limitation, what have I done wrong?

Here is how I would like to use the IDs in LimeSurvey:
- Each of my surveys has a code (outside LimeSurvey), such as: 7788
- Each survey is assigned a survey ID in the LSS file
- ALL the IDs in a survey use that code as a prefix, so my GIDs and QIDs will all be of the form 7788XXXXX (it seems the SQL length limit on IDs is 11 digits)
- Therefore it is pretty important that the IDs match what is in the LSS file.

Thanks,
Bdizzle

Ooooooops I think I posted in the wrong forum section.
Last Edit: 3 years 3 months ago by bdizzle. Reason: Wrong forum section
The administrator has disabled public write access.

Re: LSS import: GIDs & QIDs not as in LSS file 3 years 3 months ago #54838

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5278
  • Thank you received: 289
  • Karma: 246
bdizzle wrote:
When I export my survey as an LSS file, delete the existing survey, and reimport it, only the survey ID is untouched. All other IDs have changed.

This means that my JavaScript logic must be updated after the import, to reflect the new GIDs and QIDs.
Is this a bug, a limitation, what have I done wrong?
This isn't a bug. When importing a survey the IDs are adjusted according to the new IDs e.g. at the conditions. When using Javascript you have to adjust this manually.
"Problem" is that Limesurvey uses conseutive numbers (primary key) at the database so each group/question/answer will have different IDs after import even if the survey has been deleted previously. That just a matter of database design and nothing special, many other applications use this, too.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.101 seconds
Donation Image