How to get distinct record list

Hi all, I'm new. 

This is the first time I try using Outsystems. 

In my case: 

I have Invoice table and Customer table in my database, Invoice has one CustomerId, and Customer has many Invoice. How to get distinct customer record list have Invoice in Outsystems. Please help me (step by step).

Thanks for supporting 


Hello Ngoc,

You can do it with an aggregate.
As source, use the Customer, and than do a join with Invoice, change the type of Join to OnlyWith and group the information of the customer you need to have distinct values

I recommend you to do the following course, where you will learn how to use aggregates:

Eduardo Jauch


Eduardo is correct, you will need to group by all the columns that you want to be unique.

Thanks for supporting me. 

I have a new problem. I want a list (customized some field and data - this list will export to excel file), and I have a CustomerId list (distinct list in #1 question). I want to for-each this list and do some action then add a new record (after customized record ) and append to the new list.But I don't know thí action on Outsystems

Hello Ngoc,

Please, for different question, open a new thread. This way, you will receive help faster, from possibly more people, and will help keep the forum organized and easier to find questions and solutions :)


Eduardo Jauch