Only show 1 row for a record containing many comments

Only show 1 row for a record containing many comments

  

The picture below shows 2 Activities, Project Oversight and Risk Mitigation. When I click on an activity name it takes me to a Screen that allows me to add notes to that activity. Let's I say click on the first Project Oversight it takes me to screen that allows me to add notes to the activity Project Oversight, and it adds a another record to my Customer Initiative Activities screen(CIA). So it adds a 3rd Project Oversight with the new note I just added. I want to add notes to an activity without adding more records in the Customer Initiative Activities screen, I just want the last note for my activity to show on the CIA screen. I want the to only see the other notes when I go to my notes list screen. So if I add a note to Project Oversight I want it to only show the note I just added in the CIA screen, and show me the rest only when I click on Project Oversight to take to the notes screen. Any idea on how I can do that?

Solution

You can do this in 2 ways.

1. You can create an Advanced Query using the MAX aggregate, like this: https://www.w3resource.com/sql/aggregate-functions/Max-with-group-by.php

2. You can create an webblock to display only the last note of your Activity, put this webblock in your TableRecords, and, in the main screen you only query the Activities. (It can cause performance issues if you have huge tables)

Solution

Thank You!