compare dates to find latest and lookup another field in that record
I am having a hard time figuring this one out. Our CRM app has a table called Opportunities, with a relationship to a sub table called Last Actions. Each opportunity has many last actions. In the pending opportunities report (Which shows Pending opportunities as a table with each opportunity record on a line) , i want to have a column that shows the Latest Last action for each opportunity. Currently the last actions column shows a link to the last actions table for that opportunity. So i want the column to lookup the most recent last action and display the LastAction text field result.
Fields in the Last Actions table are: Date Created, Date Modified, Last Modified By, LastAction, Related Opportunity, Opportunity - Title, Opportunity - Type, Record ID#, Record Owner.
So i need to lookup the Date Modified Field in the Last Actions table for the appropriate Related Opportunity, compare it to today's date to find the latest, and display the text from the LastAction field.
I hope that this made sense. I understand what i want to do, but am having trouble figuring out how to make it happen.