Skip to Main Content
Feature Request FR-3275
Product Area Page Components
Status ROADMAP

7 Voters

Interactive Report - Group By - Listagg (concatenate)

bshumway Public
· Jul 18 2023

Idea Summary
For years I have expected this feature, but surprisingly it still isn't in the latest version of APEX.

That's alright… figured I'd get the conversation started :)

Many users when they start to explore the capabilities of the interactive report wish to see a “listagg”  option in the “Group by”. 

How it would work:

Under “function” the user selects “Listagg” (or maybe you can call it something else, like… “Combine into List” or “Concatenate Values”)… then they choose the column. 

After that they can choose the delimiter, but by default it is “, ” (comma space).  You could make the delimiter a select list (instead of free text), so that you can include the option “•” (bullet point) which if the user chooses would format it as “<ul><li></li></ul>” with each bulletpoint takingg up a new line.

For the first version of APEX containing this feature you don't have to give the user an “Order by” clause… but maybe you could add it later. Not a big deal if you just order by the column they choose (so alphabetical if the column is a string, numerical if is a number, date ascending if its a date).

If the listagg reaches an overflow (common occurrence) simply truncate at around 4000 characters and add text like “, *more not values (does not fit in this report)*”.

Lastly… there should be a “listagg distinct” option which functions the same as the listagg, but of course only shows distinct values. Honestly the “listagg distinct” is probably more useful than simply “listagg”. But I can see it would depend on the use case. The “listagg disctinct” is already a feature in SQL (19c onward) so this should be an easy enhancement.

This is currently on the roadmap for a future release of Oracle APEX.