Jump to content

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

Recommended Posts

Posted

crazy.gif

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)

Posted

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

Posted

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.

Posted

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?

Posted

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 ]

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 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.