Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: End of questionnaire: how to pass ID of the just created dataset to external CGI

End of questionnaire: how to pass ID of the just created dataset to external CGI 3 years 2 months ago #96465

  • awl
  • awl's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 16
  • Karma: 0
Hello,

I want to use the end-URL redirection for calling an external CGI program for further processing when a user has completed a questionnaire. How can I pass the ID of the actual (just entered) data record to the external programm?

Are there {placeholders} that can be used as part of the end-URL for this purpose?


BTW, I have a lot of trouble to use the wiki, as many links are not working and redirecting to the start page instead. Also, some forum links are broken.

Thanks a lot,

awl
The administrator has disabled public write access.

End of questionnaire: how to pass ID of the just created dataset to external CGI 3 years 2 months ago #96469

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1797
  • Thank you received: 439
  • Karma: 110
Hello,

- list of placeholders (inside curly braces {} ) is available here

In your case use {SID} to pass the survey id value ;) .


- Related to the wiki issues, I think that we are all waiting for a new indexation by major search engines. For the moment, you can use the wiki index page links or sometimes google web cache
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.

End of questionnaire: how to pass ID of the just created dataset to external CGI 3 years 2 months ago #96471

  • awl
  • awl's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 16
  • Karma: 0
.
Thank you, works great :) - at least in principle. :(

But {SID} represents the survey ID - that's not what I was looking for.

I need the ID of the just entered answer record.

In terms of mysql: I need the ID number in the first field of the fresh data record that has just been added to table lime_survey_123456 (with 123456 = id of the current survey}.

Background: the CGI programm needs this ID in order to do some instant processing with the answer data that have just been entered. Some results of this processing should be displayed immediately to this user which entered the data. (It would not be reliable to simply pick the latest answer record from the respective table, as there is no guarantee that this is the only user/session at a time. More than one concurrent sessions by different users are possibe. Therefore, the CGI program needs to know the actual (unique) answer ID to ensure that it will access the correct answer data that is really belonging to this user in this session.)

I tried {AID}, but that's also not what I need.

Any idea?

Regards,

awl
The administrator has disabled public write access.

End of questionnaire: how to pass ID of the just created dataset to external CGI 3 years 2 months ago #96472

  • awl
  • awl's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 16
  • Karma: 0
.
Heureka! Seems that I must use {SAVEDID}!
Last Edit: 3 years 2 months ago by awl. Reason: .
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.248 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form