Aggregate Group Display / Formatting on screen
Application Type
Traditional Web

Hi everyone :-)

I have the following aggregate.

Heading                    | Title                                     | Source          
Chest Pain                 | Chest pain pathway          | ED, 2021 
Chest Pain                 | Chest pain investigations          | ED, 2009 
Chest Pain                 | Pericardial disease | ED, 2022
Hypertension |Mild hypertension |BTS, 2019
Hypertension |Severe hypertension |BTS, 2020


I simply wish to display the aggregate on screen like this.

If I group by the heading, it looks ok in the aggregate builder, but I understand only the heading gets outputted.



But if I add the other colums to group by, the heading gets repeated for each line, and the output looks like the aggregate at the top of the page, and therefore defeats the purpose of grouping it in the first place...

Thank you



Hi Leigh,

I have created the sample OML with two approaches to display the desired data. Please check it out.

Demo

MySampleApp.oml

Hi Mayank,

Thank you so much. I wasn't able to implement it directly, but I was able to use the list -> web block (Method 2) successfully. Got exactly the output I wanted.

With this method, I understand it runs a seperate SQL query for each category, which may be as much as 30-40 per each page load. Is this likely to cause any performance or cost consequence?

Its simply the case of one to many relation ship for one heading you can have more than one title.

if you are showing these records in a table. Then you can sort the result by Heading. Then in each row check if current row heading is same as in previous row then left blank for current row. If different then add heading.

Also you can write a SQL query to get the desired output, you need to use STUFF in SQL query to get the titles for each heading.

Regards

Hi Leigh,

I have created the sample OML with two approaches to display the desired data. Please check it out.

Demo

MySampleApp.oml

Hi Mayank,

Thank you so much. I wasn't able to implement it directly, but I was able to use the list -> web block (Method 2) successfully. Got exactly the output I wanted.

With this method, I understand it runs a seperate SQL query for each category, which may be as much as 30-40 per each page load. Is this likely to cause any performance or cost consequence?

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