Limiting View of Connected Records displayed in a Parent Table View

I have two tables - Deals and Comments.  Think of:

  • Deals as a pipeline of transactions
  • Comments as a rolling list of Comments on each Deal

I can display the list of all Comments on a Deal in a Page View of Deals, but can't work out how to display just the latest comment.

As illustration, in the below view the columns up to Deal Details are from Deals; the three columns after that (Date, Comment, Next Step) are from the Comments object (with each new record a new line).  Ideally this view would only display the latest Comment / Next Steps. Not sure how to do that!  Help please.

To see more comments you would go to Deal Details where their order (and number) are easily controlled. 

1 Like

Hi David,

With how Knack works, in a table view, you will be unable to limit the number of comments here.

However, on a details page for a Deal record, you can show a table or list of related comments.
Further, in the table options for these related comments, you can sort by date with newest appearing first and you can also limit the number of records shown to one.  This can be configured on the Data Source tab in the table options.

One other option would be to create a popup view that shows only the latest comment. I've included the steps below - it works similar to the above set up, however with some small changes.

How-To:

  • Head to table options for your Deals table.
  • Add a link to view more details on your Deals table.
  • Change the column header to Latest Comment (or whatever works best). Save Changes.
  • Go to the new details page and head to the settings for the details view.
  • Remove any details that you don't want to show in the popup. Save Changes.
  • Now, to this details page, add a table or list view to show related comments.
  • In the table options for related comments, set sort to date field and from newest to oldest.
  • Set limit to show only one record. Save changes.

Now, go to the settings for the page and check the box next to 'Display page in a modal popup'. Update settings.

(Example screenshot included)

![](upload://kHuA5ENU36r1MkTAgVDpBfLDQso.png)
Now, on your Deals table, you can click the 'view' link under Latest Comment and see the most recent comment made.

Example Screenshots