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

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

Recommended Posts

Posted

When i'm doing a field lookup (I have two databases, and they are linked via partnumber, and the invoice number is looked up), it always gives me the oldest invoice number, even though I have multiple invoice numbers matching the part number.

How can I make filemaker lookup the LAST matching record given instead of the first?

Posted

Lookups grab the first related. You can sort your relationship, reversing so the last record is the first (sort by Invoice date or something). Then your lookup will work properly.

Posted

You cannot.

Use an auto-enter calculation instead.

Posted

I'll re-phrase the question.

Your on table A want to copy fields from many records in Table B to new records in Table A. Using a look up and calculation along the lines of Set Field Table A::Field1 to Table B::Field 1 always calls up the first related field. How do you get the nth record in Table B?

Posted

If you're using FMP 7 or earlier, you cannot. The GetNthRecord() functions was new in FMP 8.5.

It sounds like you need to script the process: loop through the Table B records and create new records in Table A.

But all of this sounds like a hack, needed to work around bad data design.

Posted

Quite right it is a hack. The data design has been modified from the original design and it's too far gone to back track.

I thought of a really crude way of cycling through each source Table and condensing each record into one line, using a unique character to denote end of fields. Then jumping to the destination table and populating the fields using the MiddleValues function. I really wanted to avoid that because of the headache and mess it could cause. I also wanted to avoid export and re-importing using a custom match.

Would an upgrade to 9 mean that GetNthrecord would work, I mean how does that command know which Nth record to get??

Posted

"how does that command know which Nth record to get?"

It needs to be specified in the syntax of the function.

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