Hi All,

For the rich-widget List_SortColumn you are expected to apply it over a data-structure that can be transformed via SQL because the List_SortColumn_GetOrderBy(<table ID>) method resolves to an ORDER BY statement.

If, however, your data-structure is a List (of some Structure type) then you don't seem to have such use - instead you have use of the Action ListSort; but one cannot define compound ordering in it.

My question is how can you make use of it - i.e. how can you implement compound-ordering with events from (potentially many) List_SortColumns over data from a List?

Hi Olivier,

First, List_SortColumn is also not able to sort more than one column, so there's no difference there. For your specific problem there are a number of components in the Forge that could help.

There's List Record Sort, which does the same as List_SortColumn, but for lists. It probably doesn't have multi column sort. Then there's SortRecordList, which can sort a Record List on multiple columns.

Kilian Hekhuis wrote:

Hi Olivier,

First, List_SortColumn is also not able to sort more than one column, so there's no difference there. For your specific problem there are a number of components in the Forge that could help.

There's List Record Sort, which does the same as List_SortColumn, but for lists. It probably doesn't have multi column sort. Then there's SortRecordList, which can sort a Record List on multiple columns.

SortRecordList sounds good - have you used it before? What's the best way to integrate it with a Table Records widget?

Thanks.

Hi - I'm using SortRecordList and I'm struggling to convert a List to an object.

This is because it demands that the recordList parameter be of type Object and not List <X>.

Solution

Hi Olivier,

You can use the built-in ToObject() function for that. Wrap it around your List and you should be could.

Regards,

Nordin

Solution

Nordin Ahdi wrote:

Hi Olivier,

You can use the built-in ToObject() function for that. Wrap it around your List and you should be could.

Regards,

Nordin


That worked (was applying it over the wrong object earlier). Thanks.

Happy to help Olivier :)