Welcome to the LimeSurvey Community Forum

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

close survey with unique user data from attribute_1?

  • bulgin
  • bulgin's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 5 months ago - 4 years 5 months ago #190092 by bulgin
I need to present to each user who has successfully completed the survey, a page that has a text statement, followed by the data contained in the attribute_1.

Because of the nature of the survey, do not want to send an email with this information - that I've already figured out but can't be used in this particular survey.

I'm pretty sure the powerhouse Limesurvey can handle this with ease, but I could use some pointers.

Thanks.
Last edit: 4 years 5 months ago by bulgin.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #190099 by holch
So you want to show attribute_1 in the end message?

I think this should be possible (as long as the survey is not anonymous) with something like this:
Code:
{TOKEN:ATTRIBUTE_1}

Give it a try. I don't have a survey prepared for something like this at the moment.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • bulgin
  • bulgin's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 5 months ago - 4 years 5 months ago #190100 by bulgin
Perfect! I placed {TOKEN:ATTRIBUTE_1} in the Text Elements | End URL box and it shows the associated value in ATRRIBUTE_1 from the participants record to the participant who has completed the survey.

Now, here is a new wrinkle:

Can LimeSurvey execute a mysql command or otherwise grab a value from any mysql database (perhaps a new_table in the survey database) upon a participant completing the survey? And if so, can it take that returned value and input THAT value into a completed survey message?

Maybe you are asking . . . why?

Because I need to distribute a number of redeemable digital reward card tokens to survey participants who have completed survey screen but keep the number to a threshold.

For example. 100 people are to receive a link to the survey. However, the first 30 who respond will get a digital reward card at which time the survey stops. Since 100 people are receiving the invitation, but we only need to pay out for 30, we want to be able to limit our expenditure of reward cards to 30, not 100.

The only way I can see limesurvey handling this is to have an external or internal database table with ONLY 30 reward card token so once they have been depleted the survey stop. I believe this can only be done using an external or internal table within mysql. I can build the mysql logic, just don't know how to put the returned value into the end-of-survey screen.

I hope anyone reading this can understand the logic - although it's not as complicated as a limesurvey logic formula, granted, it might be difficult for some to follow. . .

NOTE: These are seniors using the survey and do not have access to email, so emailing them does not work. They will manually go to the reward center website, enter their token, and receive their gift via regular mail.
Last edit: 4 years 5 months ago by bulgin.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #190101 by Joffm
Hi, there are a few examples here how to implement an ajax call.
I remember one where the database is queried for a unique voucher code and another one that queries the number of registration.
Knowledge of php and MySQL is necessary.
Today I am not able to creta an example.
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • bulgin
  • bulgin's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 5 months ago #190104 by bulgin
Thank you Joffm, I will study that code which I did find through the search feature and see if I can make that work. In the meantime, I've started a different thread here under the topic:

Change survey questions, pathway or fork it based on quota

I'm thinking that an alternative to my needs can be met by shifting the survey structure or pathway or attribute_X based on a filled quota. Don't now if that's possible but I've opened the topic.

As usual thanks for your timely and useful response. Have a great day!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose