I don't think that you need another table nor do you need to "import" the data into deliveries table. It's possible to set up a relationship that automatically shows the most recent record for a given PID. The relationship can match by PID and be sorted in descending order by activity_Date.
And if this requires a "self-join" (linking the table to an occurrence of itself), the relationship can be modified to keep a record from matching to itself.
Assuming that you have two tables:
Deliveries::PID = Activities::PID
Then, in Manage | Database | Relationships, double click the relationship line and select a sort order for activities that sorts by Activity_Date in descending order. IF you place fields from Activities on the Deliveries layout, they'll show data from the most recent activity record.
Hi Phil, tnx. I'm not sure if I did it exactly as you described, it works fine in my layout indeed, BUT: when I perform a search, where I want to search for ONLY the latest activities it returns also those that are NOT the latest activity. Any thoughts on how to perform a search (preferrably via script eventually) within only the latest activities?
Please describe what you are doing when you "perform a search" (exact steps) and please describe the layout on which you performed that search.