I am trying to use the parameter to return some text if my query returns nothing, and it doesn't seem to be working.
select listagg(osuser, ', ') within group (order by osuser) as "plain" from (select distinct osuser from v$session) where osuser != 'SYSTEM' and osuser not like 'VMCONFTEST%'
## @param emptymsg:The query returned no result!!
#foreach($row in $result)
Do I understand you right that "$row.plain" is written on your page? This means that your result is not empty, but contains one row and apparently this row has no "plain" value. Please try with a simple statement that will always return an empty result:
SELECT * FROM v$session WHERE osuser = 'SomethingThatIsNoUsername'
Or something similar - just try a query whose result will be empty for sure.
And also try with a simple template like this:
## @param emptymsg:The query returned no result!! This is just a test!
$row.plain is written on my page. It does work if I use your query suggestion, but I think it is when I use the listagg function that it doesn't work.
When I take my exact query mentioned above and run it in my database, it returns a list of distinct users connected, and if none are connected, it returns nothing.
I used the #foreach function to help get rid of some formatting
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG