Good Day Community, 

I have a local variable list(Reports) containing a structure. The data comes from an external site. Currently the local variable is being used in the table. Now the problem is the sorting.

Local Variable List (Reports) have the following structures inside, First is (SubmittedDate), next is (Content) and last is (Status). 

What I did is as follows.

I dropped a List_SortColumn inside the table as the course available in the Outsystems Learn.

On the properties of List_SortColumn I defined the following

And OnNotify the following flow.

START ---------------> LISTSORT ------------> AJAX REFRESH(TABLE) ---------->END

LISTSORT has the following properties 

Action - ListSort

List - Reports

By - Submitted Date


And it does not work any help would be appreciated. On note I tried searching for same conditions on community but I am having a hard time to understand. Any help would be appreciated. Thank you.

Solution

Hi Penny,

If your local variable list is of type Report List, your List_SortColumn should use the following syntax in the column attribute:

Furthermore to accomplish what you need, you need to add a boolean variable, f.e. IsAscending, to your ListSort action in the OnNotify:

Before the execution of the ListSort action in the OnNotify, you need to use the following assign for your boolean variable in order to sort your Report List (ascending or descending):

So your OnNotify action should look like this:

That should do the trick! Let me now if it works!

Regards,

Nordin

Solution

Sir Nordin 

Thank you it actually works. I was having a problem with the ascending and descending order. Thank you a lot Sir!

I'm glad I could be of help Penny :-).

Please mark the answer as solution in order to help other community members to find solutions to their problems.

Regards,

Nordin