Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

how can I relate to a specific record in a one to many relationship?


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

Recommended Posts

Posted

Hi,

I have a one to many relation where I would need only the last generated record out of the many-table. How can I do that? I always end up with the first dataset.

Thank you,

Bernhard

Posted

You need to sort the relationship or the portal. If the related data have serial numbers you can sort by them descending. Or you can sort by record creation timestamps, though this is less reliable if you create records in less than a second.

If you sort the relationship, you'll be able to access the last record in calculations and just everywhere you use this relationship. That is if you have Related::Some Field, it will return you a value from the last record. If you sort a portal, then you'll see the last record only in the first row of the portal.

Posted

It depends what you need it for. For example, if you need a value from the last related record, you can leave the relationship unsorted (which means sorted by creation order), and use:

Last ( relationship::field )

to return the value from the last record.

  • 2 weeks later...
Posted

Thank you for your help - sometimes the issues are so obvious that it is a little embarassing not to have found the solution myself.. ;)

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