250
Views
18
Comments
Aggregate a Column into a Single Value

Hi,

I am trying to calculate values based on my attributes.

I accessed this link to help me https://success.outsystems.com/Documentation/10/Developing_an_Application/Use_Data/Query_Data/Aggregate_a_Column_into_a_Single_Value

https://www.outsystems.com/training/lesson/1975/demo-how-to-create-aggregation-functions-in-aggregates


But the menus presented do not correspond


What's going on?


i pretend to:


and


can I do the calculations directly on the screen? or do I have to do it in the database?


And how do I do the calculations?

Thanks


2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi,

Can you check the datatype you used for these IVA attributes. It looks like they might be defined as alphanumeric, which you can´ t sum.

2022-10-17 06-51-09
Shweta Gedam

Hi SpiritFox,

As the Dorine said, please check data type for your required attributes, you cannot sum or average the attribute which includes text strings.


2020-09-21 11-35-56
Sachin Waghmare

Hi SpiritFox,

The SQL Server SUM() function is an aggregate function that calculates the sum of all or distinct numeric values of a column into a table. However, it looks like the values you are trying to sum is alpha numeric where it will not work.

Thanks & Regards,

Sachin

UserImage.jpg
SpiritFox

Hi all,


The datatyoe is currency. i double check!

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Can you share the oml ?

2022-10-17 06-51-09
Shweta Gedam

Do you want show your sum values in the table only or you want to just calculate and show it somewhere else?

UserImage.jpg
SpiritFox

I want it to appear on the screens

I want it to be possible for users to see

2022-10-17 06-51-09
Shweta Gedam

I'm able to show it on the screen like this, is it ok for you?

2022-10-17 06-51-09
Shweta Gedam

Here I have attached an OML to how to get values from the database for sum of rows and columns of the aggregate. You can show them on the screen as per your convenience.

Hope it works, Thanks and Happy Coding :)

TrocasProdutosv1.0.oml
UserImage.jpg
SpiritFox

Don't get me wrong, but I want to learn how to do it, so that in the future I can develop by myself. Thank you. I'll see how you did it.

UserImage.jpg
SpiritFox

Hi,


How did you insert these attributes?


I've seen a video about it but I can't find it ...

2022-10-17 06-51-09
Shweta Gedam

Hi SpritFox,

These are the calculated attributes, You can find its steps from the below documentation.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Query_Data/Create_a_Calculated_Attribute_in_an_Aggregate


Hope this helps!

2018-05-31 18-44-19
Ravi Vakkalanka

Hi SpiritFox,

Please check the attached example on how to get row and coulmn sum values. 

SumCalculation.oml
UserImage.jpg
SpiritFox

Thank you Ravi

UserImage.jpg
SpiritFox

Hi,

I don't understand what this means:

  "€", 2, ".", ",")

In the expression:

FormatCurrency (GetTrocas2.List.Current.IVA_6Sum, "€", 2, ".", ",")

where can i find information about this?


Thanks

2021-09-06 15-09-53
Dorine Boudry
 
MVP
2020-11-20 07-43-04
Unnati Khanorkar

Hi,

You can find the details in service studio only when you use the function in an expression or assignment operator.

Please refer the screen shot below - 


Let me know if this helps.

Thanks

Unnati.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.