April 5, 200223 yr 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)
April 5, 200223 yr 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
April 7, 200223 yr Author 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.
April 7, 200223 yr Author 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?
April 8, 200223 yr 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 ]
Create an account or sign in to comment