Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

We'll, I'm not having much luck getting this to work. In my line items file, each item entered has the vendor ID and the date the item was entered. These should be the only two fields I need, right? I create another occurance of my line items table and make a self-relationship based upon a calculated field. I think my calculation is where I'm having trouble. If anyone know of an example file with this type of behavior, please let me know.

Thanks

Posted

OK, I think I figured it out. I had created a self-relationship using the vendor ID field with the line items file. I created another (3rd) instance of the line items file and made a self-relationship with the 2nd instance using the date entered field. The relationship sorts the date entered field ascending to show the oldest date. A calculation field is needed which simply shows the date entered field. "Evaluate this calculation to..." at the top of the create calculation window should referance the 2nd instance of the line items file. Hope this helps anyone else trying to do this.

Posted

Wouldn't your relationship be sorted "descending"?

There is also the Last() function:

Last ( relationship::field)

will get the "last" instead of the first value of a related field. "Last" means the last entered, in creation order. In most cases this is the last in all senses of the word.

People don't see the Last() function because it's in the Repeating Fields section of the drop-down, and says:

Last ( repeatingField)

That's 'cause it was in FileMaker 2, before FileMaker became relational (in 3). But it works with relationships.

So do the Aggregate functions, which just say:

Sum ( field1, field2, etc.)

Also from FileMaker 2.

I believe a sorted relationship is a tiny bit faster (someone else tested thousands, not me).

The Last() of a sorted descending relationship would the first. It's a good idea to label your sorted relationships.

This topic is 7257 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.