# Get Newest Record from HubDB Table

**URL:** <https://community.hubspot.com/t/get-newest-record-from-hubdb-table/65908>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [September 26, 2022, 7:34pm UTC](https://community.hubspot.com/t/get-newest-record-from-hubdb-table/65908 "2022-09-26T19:34:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeterKumospace](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@PeterKumospace](https://community.hubspot.com/u/PeterKumospace)\
**Post date:** [September 26, 2022, 7:34pm UTC](https://community.hubspot.com/t/get-newest-record-from-hubdb-table/65908/1 "2022-09-26T19:34:10Z")

</div>

Hey, we have recently started setting up HubDB to hold some content on our page. The content will be for a news like page where we will have various links to different articles. I’d like to have one spot hold whatever our newest article is without a user needing to do any additional work beyond adding a new row to our HubDB table.  
So is there a way to have a page pull in whatever the newest row is in a HubDB Table?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [September 27, 2022, 7:36am UTC](https://community.hubspot.com/t/get-newest-record-from-hubdb-table/65908/2 "2022-09-27T07:36:42Z")

</div>

Hey [@](https://community.hubspot.com/t5/user/viewprofilepage/user-id/379041)[PeterKumospace](https://community.hubspot.com/t5/user/viewprofilepage/user-id/416930)

Yes it can be done just check the code below -

{% for row in hubdb\_table\_rows(‘name\_of\_hubdb’, ‘&orderBy=-hs\_created\_at’) %}

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

---

<div class="post-metadata">

**Author:** ![PeterKumospace](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@PeterKumospace](https://community.hubspot.com/u/PeterKumospace)\
**Post date:** [September 27, 2022, 3:24pm UTC](https://community.hubspot.com/t/get-newest-record-from-hubdb-table/65908/3 "2022-09-27T15:24:12Z")

</div>

This is perfect, thank you!
