2214
Views
4
Comments
Solved
Get Count and Display
Question

Hi All,

As you see in the below snap, I need the count of Doc Chasing Status from the table and display it on the web screen. Example:- Completed - 2, In-Progress - 2, On-Hold - 3.


I tried grouping the Doc Chasing Status column in aggregate and then used count function, I even got the count of each status, however, I need your inputs to display it on the web screen by using expression or by any other method.


Thanks & Regards.

Vinod

2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

You did the count and you have the places decided, now you just need to place the expression.

I guess your issue is picking the right value to match each text?

There are three ways:

  1. do a query for each string.
  2. use the query that groups to get also the description and the expression will print the text as well as the count.
  3. Do a function that receives the status and returns the count (not very practical if you have filters on the page).

Is this what you're asking?

UserImage.jpg
G Andrew Duthie
 
MVP

You should provide some more info in order to get a useful answer.

Are you building on traditional web, or reactive?

Are you using a table, or data grid? (if it's the Data Grid, then the forum for that component would be a better place for your question: https://www.outsystems.com/forge/component-discussions/5554/Data+Grid).

Also would be helpful to know which version of the platform and Service Studio you're using.

2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

You did the count and you have the places decided, now you just need to place the expression.

I guess your issue is picking the right value to match each text?

There are three ways:

  1. do a query for each string.
  2. use the query that groups to get also the description and the expression will print the text as well as the count.
  3. Do a function that receives the status and returns the count (not very practical if you have filters on the page).

Is this what you're asking?

2019-09-24 18-41-25
Jorge Martins
 
MVP

Hi Vinod Kumar R,

From what I see, you will need two independent Aggregate/SQL tools: one to get the data displayed on the Table Records, the other to get the separate counters. Just be careful that both queries apply to the same records (use the same filters for both).

For the counting, although your Group By Doc. Chasing status and Count approach would work, each counter would be in a different result record. A better alternative is just adding three calculated attributes to your second aggregate, each with an expression similar to If(YourEntity.DocChasingStatus = Completed, 1, 0) and then perform a SUM on each of these attributes. the outcome will be a single record with your three counters.

Hope this helps! 

2022-02-07 08-52-30
Pranav Pandey

Hi Vinod Kumar R,

Please find the sample oml file in the attachment. So basically in order to get the count of each group you can define a structure that will hold the count and use an advance SQL query output your count.

I hope this will help to resolve your issue.

Thanks 

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