In my mobile application I have a List. Source of list is an aggregate getOpportunities.List.

Now I want to give an filter on the screen which have values : Sort by date, Sort & group by status, filter By Account name. Once User select any filter, list on the screen should be update accordingly. Basically I need filter, sort, group by conditionally.

How I can achieve this, should I need to create different aggregate for each filter. If yes then how I will refresh list content runtime.  If NO, then how I can achieve it using single aggregate.

Please suggest.

Thank you,

Hello Vikas, welcome to the forum.

Usually, the way to do what you want is similar in Mobile and Web.

You use variables that will store the filtering definitions and use them in the filters of the aggregate that is the source of your list.

Now, what you need to do is: Every time the user change the filter definitions in screen, you call a client action and refresh the aggregate. This will trigger the refresh of the screen.

By your question, I presume you do not finish the online training yet? If it is so, please, do the online training:

This will help you solving most of your questions.


Hello Eduardo,

Thanks for the reply. Yes you are right am using a variable to pass the value of "sort by". But my problem seems little different, sorry didn't explain well.

In this for each entry I have one status from : Hot, warm, cold, converted, dead. Now I want to sort entries according to status. But problem is I don't want sorting in asc or dsc order. I want sort in order "hot, warm, cold, converted, dead" , which is neither ASC nor DSC.

I know we can do this in simple SQL, but how I will do it here in Outsystems. I tried with my own SQL, but there also not getting option to give custom option for sort.

Please suggest.

If you would use a static entity for your status, hot, warm, cold etc could be the label, the records can be ordered so that Hot gets Id 1, Cold Id 2, etc. This would allow you to sort on status.