December 28, 200223 yr I'm working with a Domains database and an Invoices database. I need a script to locate the most recent invoice for each domain, then record the payment status (successful, declined, expired, etc.) in the Domains database. I understand Filemaker relationships pretty much, it's writing the script to find the most recent invoice that is baffling to me. This seems like it should be so simple. Shucks.
December 29, 200223 yr I think if you get information through a relationship, it always takes data from the first related record, so you just have to sort the relationship so that the most recent invoice will be first. You can specify a sort for a relationship in the "Define Relationships..." dialog box. You won't need a script, just a calculation in the domains database that uses the sorted relationship to get to the relevent fields in the last invoice.
December 29, 200223 yr Author Thank you so much. This worked perfectly. I've also used it to sort the records in a portal so that the most recent invoice is at the top of the list. Thanks again! ~~S
Create an account or sign in to comment