1

I am really new with Apex, and I got this situation, I have uploaded 10 png files to "static application files" section of my application. I have a query something like this select name, imageName,phoneNumber from myTable the imageName field, holds the name of the static file loaded before.

My problema is, how can I show the image in the listview? I cant find a way

I am using "Application Express 18.1.0.00.45"

I've try this way:

select name, '<img src="#APP_IMAGES#' || imageName ||'.png" alt="image">' as imagenName , phoneNumber from myTable

This way too

select name, '"#APP_IMAGES#' || imagenName ||'.png"' imagenName ,phoneNumber from myTable

none of those options work.

any help Will be great

KillemAll
  • 633
  • 1
  • 10
  • 25

1 Answers1

0

I tried it and this works for me:

In the Attributes Menu under "Settings" you have to select "Show Image".

Then Select "Image read from URL" as your "Image Type".

Chose the column from your select, which includes the URL (imageName), for "Image URL Column".

Now you can use your code in the select like this:

select name, '#APP_IMAGES#' || imagenName ||'.png' as imageName, phoneNumber from myTable
Philipp
  • 745
  • 2
  • 7
  • 20
  • Hi, I've got all you said set, and even I've try to use only one image in the query `'#APP_IMAGES#ANULADO.png' as imagenName` that reference is just a copy paste from the shred components/static application files/Reference column of the grid of files Any other idea? – KillemAll Feb 12 '20 at 12:32
  • Your listview should show the "broken image" icon, as its not loading correctly. If you inspect the image in your browser, what is the image src that shows up there? – Philipp Feb 12 '20 at 12:34
  • Also are you sure that your variable name is "imagenName" and not "imageName" ? You are using both in your post, so one might be a typo. – Philipp Feb 12 '20 at 12:39
  • I'm sure the name of the field is the correct, I've checked twice, I've try againg changing to other uploaded file , this time was PROCESADO.png, when the page run, I see the 'X' (the broken lmage as you said) , I've seen the code and the code in the HTML page is this: `PROCESADO` thanks for your help,... there must be something else wrong – KillemAll Feb 12 '20 at 20:59
  • For me the src shows up like this: ```imageName```. Are you sure its a png and not a .jpg? Did you copy the reference adresse to the file from the static application files? I don't really know what to tell you, as its working for me .. Maybe try to delete your list view and create it from scratch. Could be you made some changes that prevent it from working now, when you tried to get it running. – Philipp Feb 13 '20 at 07:54