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

More
4 years 2 months ago #96465 by awl
awl created the topic: End of questionnaire: how to pass ID of the just created dataset to external CGI
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

Please Log in to join the conversation.

More
4 years 2 months ago #96469 by Ben_V
Ben_V replied the topic: End of questionnaire: how to pass ID of the just created dataset to external CGI
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
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
4 years 2 months ago #96471 by awl
awl replied the topic: End of questionnaire: how to pass ID of the just created dataset to external CGI
.
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

Please Log in to join the conversation.

More
4 years 2 months ago - 4 years 2 months ago #96472 by awl
awl replied the topic: End of questionnaire: how to pass ID of the just created dataset to external CGI
.
Heureka! Seems that I must use {SAVEDID}!
Last Edit: 4 years 2 months ago by awl. Reason: .

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now