Welcome, Guest
Username: Password: Remember me

TOPIC: Export -> Import. To remain the same group id, answer id.

Export -> Import. To remain the same group id, answer id. 3 years 2 months ago #62475

  • sitawit
  • sitawit's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Dear guys,

I have a survey created in another server and I want to export and then import it to another survey. The only problem is the ID of groups and answers are alter when it is in a new server.

I understand that it is because of inserting new data into the system the ID will just re-new generate according to auto-increment setting.

But how can we make it can be exact the same ID. I do have some issue that I need it to be the same ID. Is it possible? I use .lss format. I saw an exported ID in a file too. So it led me to believe I can do what I just ask but I can't.

Can someone guide me how?
Thanks
Last Edit: 3 years 2 months ago by sitawit.
The administrator has disabled public write access.

Re: Export -> Import. To remain the same group id, answer id. 3 years 2 months ago #62476

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1069
  • Thank you received: 235
  • Karma: 74
Yes you can edit your .lss file changing the IDs values.

example for the survey ID:
a) open your .lss with a text editor
b) search for <sid>
c) change the number
d) upload and try

After for the question groups I imagine that you can get some troubles :P
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Last Edit: 3 years 2 months ago by Ben_V.
The administrator has disabled public write access.

Re: Export -> Import. To remain the same group id, answer id. 3 years 2 months ago #62483

  • greg_d
  • greg_d's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 47
  • Thank you received: 7
  • Karma: 4
Hi,

as benitov said, you can change survey id in the .lss file, if such survey id does not exist in you database it will not be changed.
And this is the end of good news. Groups ids, questions ids, subquestions ids, conditions ids and so on are generated by auto-increment.
Take a look at admin/import_functions.php if interested.
If you are really desperate and survey is not very complicated you can try playing with ids inside database but then survey consistency is at risk.
The administrator has disabled public write access.

Re: Export -> Import. To remain the same group id, answer id. 3 years 2 months ago #62499

  • sitawit
  • sitawit's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Thanks, guys.

I'll try looking at import_functions.php. And I just wanna know why group id and answer id are there but can't remain the same when import to new server.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.115 seconds
Donation Image