GeorgeMack Posted April 5, 2002 Posted April 5, 2002 I would like a global field to display the maximum value of a certain field of all records. Is there some way to define the global to reflect the current maximum value? I had tried a calculation field, but it saw the maximum of the current record (obviously a limited case.) (Filemaker 5.5)
andygaunt Posted April 5, 2002 Posted April 5, 2002 OK, you can do this in a calculation. You need a constant field (Calcualtion [1] Then create a self join relationship using constant on both sides. [Constant] Now your maximum value calculation field is Max(Use the constant relationship::field) this will give you the maximum value from any of the records in the database. HTH
GeorgeMack Posted April 7, 2002 Author Posted April 7, 2002 Thanks for your reply. I thought I was going nuts (or had tripped over a bug). I think I understand: the number field is defined as a constant, and the maximum is a second field, calculating the self-relationship. Right? I'll give that a try.
GeorgeMack Posted April 7, 2002 Author Posted April 7, 2002 I thought I knew what you were saying, but what I tried didn't work. I have a set of invoice numbers (field "invoice#"), sequentially numbered. I set a self relation to the same field. I made a calculation "max(gminvoices::invoice#)". But on the layout, it always finds the invoice number of the current record instead, so the "max" changes as I change the record! What did I do wrong?
djgogi Posted April 8, 2002 Posted April 8, 2002 quote: Originally posted by GeorgeMack: I thought I knew what you were saying, but what I tried didn't work. I have a set of invoice numbers (field "invoice#"), sequentially numbered. I set a self relation to the same field. I made a calculation "max(gminvoices::invoice#)". But on the layout, it always finds the invoice number of the current record instead, so the "max" changes as I change the record! What did I do wrong? You have to use "max(constantRel::FieldNameWhoseMaxYouWant)" Where constantRel is defined as Andy sad so you can access all records Dj [ April 08, 2002, 12:39 AM: Message edited by: dj ]
Recommended Posts
This topic is 8336 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