CMS Development

Suonpera
Membre

Loop hubdb table rows in reverse order

Résolue

Hey Friends,

 

Currently using this to loop through a table
{% for row in hubdb_table_rows('2594592', 'GET') %}

 

But I need it in the reverse order, so I can display the most recent rows first. 

How do I do that?

Couldn't find any similar examples in the documentation.

 

Thanks!

 

0 Votes
1 Solution acceptée
prosa
Solution
Contributeur de premier rang

Loop hubdb table rows in reverse order

Résolue
{% for row in hubdb_table_rows('2594592', '&orderBy=-hs_created_at') %}

Notice the '-' symbol

If this post helped you resolve your issue, please consider marking it as the solution. Thank you for supporting our HubSpot community.

Voir la solution dans l'envoi d'origine

1 Réponse
prosa
Solution
Contributeur de premier rang

Loop hubdb table rows in reverse order

Résolue
{% for row in hubdb_table_rows('2594592', '&orderBy=-hs_created_at') %}

Notice the '-' symbol

If this post helped you resolve your issue, please consider marking it as the solution. Thank you for supporting our HubSpot community.