Difficulty Level: Advanced. This post assumes a strong understanding of HubSpot tools and technical knowledge. Insutructions are given as guidelines and may require additional customisation.
Let's assume you have a HubDB table (ID 12345) with two columns:
A date column (Date type) with the column name "date"
A title column (Text type) with the column name "title"
In your code, you can use the orderBy parameter to sort your table by a specific column (in this case, "date"), adding a minus symbol in front of it if you want to reverse the order. So your query parameters will either be "&orderBy=date" or "&orderBy=-date"
Note: if you've somehow landed on this post looking for a way to sort the actual HubDB table, unfortunately, that's not possible as of the time of writing this post unless you do some hacky export/order on a spreadsheet/re-import. But be sure to upvote the idea here! In a recent update, HubSpot have said they're working on it so fingers crossed!