This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,964 Users
  • 2,269,775 Discussions
  • 7,916,823 Comments

Discussions

Dynamic download text for Download Blob

Scott Wesley
Scott Wesley Systems Consultant & TrainerPerth, AustraliaMember Posts: 6,272 Gold Crown
edited Jul 30, 2019 1:57AM in APEX Discussions

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

StewStrykerNH

Answers