Welcome to the LimeSurvey Community Forum

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

Compare External Random Number with Random Number Generated by LS

  • adangel29
  • adangel29's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 4 months ago #222696 by adangel29
We would like write branch logic based on a comparison of a randomly generated two-digit number (unique to each respondent) with an externally verifiable random number (e.g. first two digits of the NITS Randomness Beacon ). We would like to use the first two digits of the most recent NITS randomness pulse as our external random number (most recent full pulse string available here: [url] beacon.nist.gov/rest/record/last [/url]). Limesurvey would need to retrieve the full pulse string from the URL at the time the respondent arrives at the question, strip the pulse string of non-numeric characters and truncate it to two digits, and then compare it with a random number it has generated itself. Is this possible?

Any advice on how to do this or suggestions on better approaches would be greatly appreciated!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 4 months ago #222699 by Joffm
Hi, 
What do you want LimeSurvey to do?

1. You pass the full string by URL
2. LimeSurvey removes the non-numeric characters and and uses the first two digits.
That's not a problem.

and then compare it with a random number it has generated itself.

And now?
LimeSurvey generates a two digit random number (between 0 and 99) ?
Now we have two numbers.

And what to do now?
And what for?

Joffm




 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
2 years 4 months ago #222707 by jelo

And what to do now?
And what for?

 
The purpose is described as "write branch logic based on a comparison of a randomly generated two-digit number".
So different set of pages are displayed depending on the comparison.
I wonder how a two digit number 00-99 can be unique for every respondent. That would limit the amount of respondents to 100.


 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose