Newbies Tiny Bubbles Posted October 30, 2003 Newbies Posted October 30, 2003 This is a toughie I have been banging my head on for about two years, I was about to throw in the towel when I discovered this forum. I have have a database of mini courses and a database of participants who wish to sign up for said courses. The "full" point for the courses is 20. Now I can keep a running total of the number of particpants signed up, but I want to put this info into a caculation so when I try to assign someone a course that is full, I will get warning "This course is full, try another." Thing is, I have not been able to automate this, and therefore, I still us the "hand" system to tell when the course is full. Then, I add a validation calculation, "MC 20 is full, please try another." I am sure you can imagine the problems this creates. Not least of which is me putting someone in a course that is full or not offered on that day (this has happened more than once.) So, any thoughts? I will be out of the office until Monday. Have a spooky weekend everyone!!
Fitch Posted October 30, 2003 Posted October 30, 2003 This is not all that tough. Something like ... Count(Course::Participant) >= 20 ... should work for validation. However, it's not clear how you are assigning participants to courses or how you are validating.
RWX Posted October 30, 2003 Posted October 30, 2003 This seems relatively simple. If you have a database with courses and one with participants, use a join file to relate participants to courses (as I assume a participant can be enrolled in multiple courses either simultaneously or in succession?). Then use Tom's Count(...) validation to limit the number of participants enrolled. You could even take this one step farther and create a calculated "Status" field. If Count(...) is less than 20, Status = "Course Open." Otherwise Status = "Course Closed." -Rob
Newbies Tiny Bubbles Posted November 4, 2003 Author Newbies Posted November 4, 2003 Thanks for the suggestions. These are the kind of things I have been trying. Let me get a bit more explicit. This is for a week long seminar. There are courses on Tue, Wed, Thur, Fri, and Sat. Participants sign up for 3 choices on each day. If a course is closed, we go to the second choice. The databases are set up as follows: Summer04 (partipants file with a MCTue, MCWed, MCThur, etc fields). It is linked, through the mini course IDkey (01, 02, 03, 14, 25, etc.) Now, this may be where things get tricky. Course 01 is offered on Tue and Wed but not Thurs and Fri. This means the relationships are with MCTue=IDKey, etc. Over in the MC04 file, I have a calculation field to get the count zc.particpantTotalWed.c=Count(Summer 04| MCWed::WedMC1) This works fine, but when I use it to validate entries on the Summer04 side, it doesn't work. Count(Wed MC::zc.participantTotalWed.c) >= 20 I thought it might have something to do with a self join, so I tried that on the Summer04 side, still no dice. Count(Self We::WedMC1) >= 20 So, I need this to work on the Summer04 side because that is where I enter the IDKey for each day. It is here that I need it to say: Sorry, that course is full, try another if the course is full. Any further ideas, kind folks?
Fitch Posted November 5, 2003 Posted November 5, 2003 Looks like you're trying to get a count of a count??? You don't need this: Count(Wed MC::zc.participantTotalWed.c) >= 20 just this: zc.participantTotalWed.c >= 20
Recommended Posts
This topic is 7745 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