Issue to refresh list with select condition from database (mobile outsystems)

Issue to refresh list with select condition from database (mobile outsystems)

  

Dear all, I faced some issue when try to refresh the records into list.

Assume I have a table name <leave>, with 500+ records, and I wish to load the records with certain conditions  so that the List Widget will only display the respective records instead of all 500+ records.


The above screenshot is after load out all records. What should I do if I only want to load records which is not <LEE JIAN HAO> but others?

I try to search online but there is kinda hard for me to find the solutions. Just want to ask Is it possible to do using SQL? I attached my .oml file and hope someone can guide me on it...Thanks.


Hi Lee,

You don't need an Advanced SQL node for that. You can simply use the filters of the aggregate that you created in the first place.

Check out on how to work with aggregates:

https://success.outsystems.com/Documentation/10/Developing_an_Application/Use_Data/Query_Data/Filter_Query_Results

On the other hand, if you obtain the data e.g. via a REST service, and you have the entire list but don't want to display it in its entirety, you can either build a new list "manually", i.e. use a ForEach and ListAppend*, or use the new action ListFilter to filter your list (note I've not used it yet myself, so I don't know whether it'd be suitable in your case).