Table Record sort from Variable (with xxx List as datatype)

Table Record sort from Variable (with xxx List as datatype)

  

I got myself some Table Records sorted the way I wanted it to be (dynamic sort query) together with ListSortColumn widgets on a local entity/database.


This time, I will be using a local variable filled with non-primitive items gotten from my own service. As you can guess, I can not use any Entity or database as all the items I'm using come from the service itself, there are no items stored on the local storage.


As dynamic sorting is not an option, how am I supposed to get this Table Record sorted? I know I might have the list sorted from the server service but let's say I'm forced to sort it on the client site.


Thank you all by advance. Cheers.

Solution

Hi,

To sort lists you can use the System action ListSort.

This action allows you to sort based on a given attribute present in the List. In your case, you will have to implement the logic of which attribute to sort and if it is ascending or descending (previously, the ListSort widget did this for you).

Cheers,

João

Solution

João Mateus wrote:

Hi,

To sort lists you can use the System action ListSort.

This action allows you to sort based on a given attribute present in the List. In your case, you will have to implement the logic of which attribute to sort and if it is ascending or descending (previously, the ListSort widget did this for you).

Cheers,

João

Yup, this totally worked out!  Thank you very much.


Now I will try to make it a little bit more dynamic so that I can have my list sorted by multiple fields depending on which columnd field I click on.


Thank you again.