Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Right column in the URI but the data is entered in the wrong column in the db

  • Kabengwa
  • Kabengwa's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #168931 by Kabengwa
Hello,

I have a survey to which I answer with data that has been created in a link that my application generates. It is all working fine until I noticed that the right data is being put in the wrong column in the database. I am going to attach a copy of the survey and the link that is generated.

The link is long but I will filter it later.

Code:
https://mark.toughblue.com/index.php/253932/newtest/Y?lang=de&253932X4179X32602=A2&253932X4164X32586SQ001=sales&253932X4164X32586SQ002=&253932X4164X32586SQ003=&253932X4164X32586SQ004=&253932X4164X32586SQ005=&253932X4164X32586SQ006=&253932X4164X32586SQ007=&253932X4164X32586SQ008=&253932X4164X32586SQ009=&253932X4164X32586SQ010=&253932X4164X32586SQ011=&253932X4164X32586SQ012=&253932X4164X32586SQ013=&253932X4164X32586SQ014=&253932X4164X32586SQ015=&253932X4164X32586SQ016=&253932X4164X32586SQ017=&253932X4164X32586SQ018=&253932X4164X32586SQ019=&253932X4164X32586SQ020=&253932X4171X32592SQ001_SQ001=mark&253932X4171X32592SQ001_SQ002=weruku%40gmail.com&253932X4171X32592SQ002_SQ001=sssali&253932X4171X32592SQ002_SQ002=ssalipro%40yandex.com&253932X4171X32592SQ003_SQ001=&253932X4171X32592SQ003_SQ002=&253932X4171X32592SQ003_SQ002=&253932X4171X32592SQ004_SQ001=&253932X4171X32592SQ004_SQ002=&253932X4171X32592SQ005_SQ001=&253932X4171X32592SQ005_SQ002=&253932X4171X32592SQ006_SQ001=&253932X4171X32592SQ006_SQ002=&253932X4171X32592SQ007_SQ001=&253932X4171X32592SQ007_SQ002=&253932X4171X32592SQ008_SQ001=&253932X4171X32592SQ008_SQ002=&253932X4171X32592SQ009_SQ001=&253932X4171X32592SQ009_SQ002=&253932X4171X32592SQ010_SQ001=&253932X4171X32592SQ010_SQ002=&253932X4171X32592SQ011_SQ001=&253932X4171X32592SQ011_SQ002=&253932X4171X32592SQ012_SQ001=&253932X4171X32592SQ012_SQ002=&253932X4171X32592SQ013_SQ001=&253932X4171X32592SQ013_SQ002=&253932X4171X32592SQ014_SQ001=&253932X4171X32592SQ014_SQ002=&253932X4171X32592SQ015_SQ001=&253932X4171X32592SQ015_SQ002=&253932X4171X32592SQ016_SQ001=&253932X4171X32592SQ016_SQ002=&253932X4171X32592SQ017_SQ001=&253932X4171X32592SQ017_SQ002=&253932X4171X32592SQ018_SQ001=&253932X4171X32592SQ018_SQ002=&253932X4171X32592SQ019_SQ001=&253932X4171X32592SQ019_SQ002=&253932X4171X32592SQ020_SQ001=&253932X4171X32592SQ020_SQ002=UL&253932X4181X32606=A1

Focus should be on 253932X4181X32606 its the right column in the database but it will enter the data it holds in 253932X4180X32605

Any help is welcome.

File Attachment:

File Name: limesurvey...3932.lss
File Size:283 KB
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #168933 by tpartner
The provided link doesn't help us as IDs are changed on survey import.

What LS version are you using?

Have you tried using question codes instead of SGQ identifiers in the URL?

Do all questions have unique question codes?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Kabengwa
  • Kabengwa's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #168951 by Kabengwa
LimeSurvey
Version 2.72.3+171020

That is the version of Lime survey that I am using. and when I import in between my dev and stage server the ids don't change, as long as it is not used already.

Have you tried using question codes instead of SGQ identifiers in the URL? -Not yet is there an article on how to do this using the API.

Do all questions have unique question codes?

Yes, they do as the export that i attached will show you.


And the reason I am using an older version is that I have failed to find a better one on docker and this version seemed to be working very fine.

Thank you for thr response.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago - 5 years 10 months ago #168967 by tpartner

...when I import in between my dev and stage server the ids don't change, as long as it is not used already.

Group and question IDs are sequential so always get changed during import.


Have you tried using question codes instead of SGQ identifiers in the URL? -Not yet is there an article on how to do this using the API.

I'm not sure why you are now referring to the API but here's an overview of prefilling questions via the survey URL - manual.limesurvey.org/URL_fields/en#Pref...using_GET_parameters . It looks like your problematic question is single-choice so you should be able to use the question code.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 10 months ago by tpartner.
The topic has been locked.
  • Kabengwa
  • Kabengwa's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #168975 by Kabengwa
Code:
I'm not sure why you are now referring to the API......

i am using the limesurvey API to generate the link that i posted in php. and the issue is not really with the link creation but the fact that the column is well written and the value attached to it ... However in the database that answer is put in a different column ...

I need to know the possible causes of such a thing so that i can maybe understand better what to do

Let take alook at the link u provided too and see.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #169008 by DenisChenu
If you set ONLY 253932X4181X32606 : did it work ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • Kabengwa
  • Kabengwa's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #169062 by Kabengwa
i finally found the issue. i was missing a column when creating the link. however i would like to know they are always supposed to be in a given order to work?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #169075 by tpartner
No, the order should not matter.

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