Sorting Tables

Hi Community,

I have a table and I would like to sort it from the highers price to the lowest.

I know I have to use orderBy= in my query, but I’m not sure exactly how it works.

Can anyone help?
Thank you

{% set table = hubdb_table_rows(table_id,'assetclass__contains=Future',orderBy='what_goes_here?') %}

You would put in the internal name of the column you want to sort by. I beliiieve if you want to go Highest to Lowest it’d be a reverse sort, so add a minus sign in front of the column name. Also, when you have multiple filters in your table function you want to use &, not commas.

{% set table = hubdb_table_rows(table_id,'&assetclass__contains=Future&orderBy=-price') %}