dalahasten Posted May 24, 2004 Posted May 24, 2004 I have a question about some (for me) difficult calculation. I have a table with Events. Every Event can have several participants (own table). The event has a limit of how many participants it can have. Every participant has a status, which can be "allowed" or "not allowed" (which is choosen from a valuelist). My question is, how can I count how many of the participants that have the status = "allowed"? regards /P
Ender Posted May 24, 2004 Posted May 24, 2004 There are several ways to do this, but the best way depends on where you need to use it. Is it just for a report? Is it needed in the context of the Participant table or the Event table?
dalahasten Posted May 24, 2004 Author Posted May 24, 2004 I need it in the Event table to be able to calculate if there is any places left (so that the limit for the event isn't yet reached)
Ender Posted May 24, 2004 Posted May 24, 2004 I don't quite get the Allowed/Not Allowed terminology, but this is how you would add a count of "Allowed" in Event: In Event, define fields: gAllowed (global, text) enter "Allowed" into field Count_Allowed (calculation, number) = Count(Participant by Allowed::Participant ID) Add a table occurance of Participant, called Participant by Allowed: Event::Event ID = Participant::Event ID and Event::gAllowed = Participant::Status
Recommended Posts
This topic is 7749 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