JoeDu Posted June 3, 2008 Share Posted June 3, 2008 What I have is a few thousand records for a number of clients, and each client has dozens of records. I'd like to find the last record for each client, and omit the rest, in a script. This seems so simple yet I'm wrestling with the commands. Any help? Link to comment Share on other sites More sharing options...
Techphan Posted June 3, 2008 Share Posted June 3, 2008 Hopefully you have clients in one table and the "records" in another table. Make a client table, viewed as a form, and put a portal to the related records. Sort the records by date (either ascending or descending). Finally, loop through all of your clients with a script. Look at the portal last record (ascending sort) or first record (descending sort) to get the date of the last record. Link to comment Share on other sites More sharing options...
JoeDu Posted June 4, 2008 Author Share Posted June 4, 2008 I'll try that, thanks!!! Still getting used to portals and relationships. But yes, thankfully I had the foresight to create the client table separately, and the records table references fields from the client table. Link to comment Share on other sites More sharing options...
Recommended Posts