In Aggregate or SQL i need to add custom column in result set. That custom column will show the row number or row position. 

For example i have employee entity i need output like below

EmpIdName(custom column)

Thanks & Regards

DM Singh

Hi DM,

There is no way to do what you want. However, the CurrentRowNumber property of the Aggregate's List contains a sequence number you may be able to use. If that's not what you want (e.g. because you want the sequence number to be stable even after sorting the list), you can add the sequencey yourself in a For Each.


why not use the rownumber of the list itself as an expression the column.

That said, I am not sure what the value of the rownumber is in your result. ordering differently will result in different rownumbers for the same record.

and actually to answer the first question..

just look at https://success.outsystems.com/Documentation/10/Developing_an_Application/Use_Data/Query_Data/Create_a_Calculated_Attribute_in_an_Aggregate

you can also add custom columns to the aggregate itself by rightclicking on a column (dropdown will show at the bottom "add new attribute"

i tried, the result using


starts with number 0:


That is correct, what is your point? I would assume DM is capable enough to do a +1?

Just to complete the information about 


that it starts with 0, not 1.