Manual sorting

Hi!
This topic appeared just on time because I could use you expert help on this as well.
I have a relation list that I Join as templated column to turn to a HTML table.

I sort the list using the sort number but the HTML table isn’t effected because
the sort of the join list from the relation only knows to go by sheet order.
Is there any way I can Sort it within the table by a numeric column?
any HTML trick for it?