Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi all,

I have:

- a database with "n" golfers

- a database with "n" tee times

- a database with "n" dates

The problem:

I want to assign "randomly selected" groups of 4 golfers from a found set of golfers that I determine (foursomes!) to tee times I assign ----on dates that I also assign----How do I write a script for this?

[ May 07, 2001: Message edited by: Strad ]

[ May 07, 2001: Message edited by: Strad ]

Posted

quote:

Originally posted by Strad:

Hi all,

I have:

- a database with "n" golfers

- a database with "n" tee times

- a database with "n" dates

The problem:

I want to assign "randomly selected" groups of 4 golfers from a found set of golfers that I determine (foursomes!) to tee times I assign ----on dates that I also assign----How do I write a script for this?

You have a very solvable problem here and I am convinced that you can do it yourself. However you have not even begun to actually work on the problem. This is akin to asking how to script an account system.

Basically I see several smaller problems that you need to solve in order to solve the larger problem.

First you need to break your golfers into groups of 4.

Then you need to assign each group of 4 to a tee-time.

You will need some method of determining the available tee-times on your given day and tracking who is golfing at which time.

Start by breaking this up, as I have done, and solve the smaller problems. Then come back here IF you run into any specific problems.

Posted

Capt oh Capt,

You have much more faith in my intellect and logic abilities than you should have-----the fact is--I am not the posting equivalent of a "one-niter"---I do not expect to do nothing and get all----It is embarrassing, but I have spent considerable time trying to figure this problem out ---and cannot---and I am very reticent to share my ideas on what I tried ---because they are so STUPID---- your solvable problems---yes I did that and had the same conclusions---I just do not have a clue how to search all my golfer records and divide them into random groups of 4 ---not even a sniff---SORRY for my stupidity

[ May 07, 2001: Message edited by: Strad ]

Posted

Well, here's a start. To assign random foursome:

1. Create a field called "Order" and another called "Foursome", both number fields

2. Use the replace command to set the "Order" field to the following calculated value:

= Random

3. Sort by the "Order" field. Your golfers are now in a nice random order.

4. Use the Replace command to set the value of the "Foursome" field to the following calculated value:

= Int((Status(CurrentRecordNumber)-1)/4)+1

Now, every member of a particular foursome will have the same value in the Foursome field, so you can now summarize by that field, etc.

This topic is 8603 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.