11
Views
4
Comments
Solved
How to show count of records for each category or form type in a screen
Application Type
Traditional Web
Service Studio Version
11.8.12 (Build 32251)

Hello All,

Currently I am trying to create a list screen to display total numbers of records for every category to the user and also allow user to export all the records for each category to be exported both separately and all at once. 

My concern is that, I have used the 'Count' function inside the aggregate that populates the records for each category to calculate the total number of records existed for each category and then used 'Group' to group the records by their categories but how can I display it in a Table Records so that user can see for category A it has how many records in total, category B it has how many records in total,etc.

The available option to choose in expression or output from aggregate are only these options as below:

Rank: #496
Solution

Hi Junior,

Firstly, you should add the request type label to the group, which means that u need to group by both request type id and request type label. Then you can use that label to show name and count

Secondly, with this aggregate result you cannot export it. Everywhen you need to export data, call another aggregate with full data without group by to export what u need

Hope this help

Rank: #12040

Hi Shingo, 

Looks like it is the case for this situation. I will look into the solution anyway. Thanks for your input ;)

Rank: #64

Hi Junior,


You can use GetRequestByFilter.List.Current.RequestTypeId + " - " + GetRequestByFilter.List.Current.Count.

The is used to concatenate.


Cheers,

João

Rank: #496
Solution

Hi Junior,

Firstly, you should add the request type label to the group, which means that u need to group by both request type id and request type label. Then you can use that label to show name and count

Secondly, with this aggregate result you cannot export it. Everywhen you need to export data, call another aggregate with full data without group by to export what u need

Hope this help

Rank: #12040

Hi Shingo, 

Looks like it is the case for this situation. I will look into the solution anyway. Thanks for your input ;)

Hello Junior


When you use group by in aggregate, your aggregate output contains only grouped item. If you want to get some other fields also in output, use group by for those columns also. Probably it does not affect output data if nothing will be there to group. Always give a label to your grouped item to identify it in expression and also sequence is important so the higher level grouping should be done later.


Hope it helps!


Sanjay