363
Views
3
Comments
Solved
How to get group by aggregate count through expression

Hi All,

New to outsystems so your need your help, 

Can please let me know how to get groub by count through expression..

This is my group by aggregate 


I need to show group wise count in below table (e.g. Security Keeper - 4, Team Semicolon: 5 etc.)

Semicolonv1_1_14_Feb.oml
2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Rohit,

You have all the Member count values the same because I see you are referring to a different data source than the Table widget for the MembersCount expression value that is pointing to the first record of the GetTeamsCount Aggregate result set in every table row.

Table Source: GetTeams Aggregate

Members Count Expression: GetTeamsCount Aggregate

As a solution, you define a separate block defining the logic to only show the TeamMemberCount per team and reference the same in the Members column inside the table. 

Refer to the attached oml.

I hope this helps you!


Kind regards,

Benjith Sam

Semicolonv1_1_14_Feb.oml
UserImage.jpg
Saransh

Nice man. Block was great Idea, but from where did u get these ideas?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Rohit,

I'm not sure I understand your problem. You already have created the right aggregate. The output of the aggregate is a structure with two attributes, "Name" and "Count" this seems exactly what you want?

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Rohit,

You have all the Member count values the same because I see you are referring to a different data source than the Table widget for the MembersCount expression value that is pointing to the first record of the GetTeamsCount Aggregate result set in every table row.

Table Source: GetTeams Aggregate

Members Count Expression: GetTeamsCount Aggregate

As a solution, you define a separate block defining the logic to only show the TeamMemberCount per team and reference the same in the Members column inside the table. 

Refer to the attached oml.

I hope this helps you!


Kind regards,

Benjith Sam

Semicolonv1_1_14_Feb.oml
UserImage.jpg
Saransh

Nice man. Block was great Idea, but from where did u get these ideas?

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