bbcardguy Posted November 1, 2006 Posted November 1, 2006 I have a database of customers and prospects. If they reply to an ad they will get entered to win something. How do I track this with the intent to pick a random winner, and how do I pick the winner at random? Thanks in advance for any help. Sorry were still on 5.0 v3
comment Posted November 1, 2006 Posted November 1, 2006 See if this helps. The syntax is for version 7 and higher, but I think the principle is quite clear.
bbcardguy Posted November 1, 2006 Author Posted November 1, 2006 thanks but I could not get the commands to match.
comment Posted November 1, 2006 Posted November 1, 2006 OK, try something like: Find All Set Field [ gWinner, Int ( Random * Status (CurrentFoundCount) ) + 1 Go to Record [ gWinner ] Set Field [ IsWinner , 1 ] This is just a basic sketch. Instead of finding all records, you could start by searching for only those who have entered. Or you could have a related file for the entries - so you can keep history of mutiple draws. You could keep the winner's ID in a global, instead of marking the record. And so on...
Recommended Posts
This topic is 6658 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now