Skip to Main Content

APEX

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Dynamic download text for Download Blob

Scott WesleyJul 29 2019 — edited Jul 30 2019

This issue rings a bell, though I thought it would either be fixed already, or my search-foo is failing me.

Classic report on a table with a blob, so I include a column type 'Download Blob'

I'd like the download text to be the filename, but this attribute doesn't seem to accept row-level substitutions. I can substitute a &P1_ITEM., but I have rows of data. I'd like the substitution to be relevant to the data within the row.

pastedImage_2.png

&FILENAME. syntax returns null, and alone it would be replaced by the 'Download' text

pastedImage_3.png

I also tried :FILENAME, which is cleared on save; and #FILENAME#, which returns verbatim.

An alternative, which I'm sure I've done before but couldn't find the example, was to embed the data within another column.

<span class="filename" data-filename="#FILENAME#">#CREATED_BY#</span>

Then run this JavaScript After Refresh of the region.

$('.filename').each(function() { $(this).closest('tr').find('td[headers=OUTPUT_BLOB] a').text( $(this).data('filename'));});

pastedImage_10.png

Is there a better way?

This is with APEX 18.2

Comments
Post Details
Added on Jul 29 2019
10 comments
1,606 views