Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6658 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.