How can I use list_sort rich widget with an advanced SQL query?
I see you can use the list_sort widget with an aggregate and the dynamic sort function.
First to implement the support to the list order in the advanced query you need to define the input in the query that you use in the SQL and you also need to pass to the input the output of the List_SortColumn_GetOrderBy passing the Table Records id and the default attribute to order by (using SQL notation):
Remember that to test the query you need to pass hard code in the test parameters the value you want.
After this, you need to implement your layout to sort the columns you have on the table records, for that you need to use the webblock List_SortColumn from Richwidgets that converts the header of the table into an header with the ability to sort the contents. Notice that you need to pass the entity and column associated you want to sort by.
I'm also attaching a version of an eSpace with this working.