How to Show image in datalist?

Confluence User - 07 Oct, 2016

Dear master,

How to show image icon in datalist builder?

datalists;image

4


07 Oct, 2016
confluenceUser
confluenceUser

Hi Iman Maryadi

In Datalist>Source>Configure JDBC Datalist Binder, you can compose the SQL query example below (for MySQL) to display images in datalist listing, do ensure you tick "Yes" in column properties for "Render value as HTML". Do ensure that the:

  1. Path to the image download folder is correct
  2. The "fieldId" storing the image's filename is correct, example  "c_Picture"
  3. Size the image height and width accordingly
  4. If the image needs to be a clickable link, add the required <a> tag in the CONCAT query
  5. Do amend to suit your database brand (SQL Server, Oracle etc.)

SELECT CONCAT("<img src='/jw/web/client/app/MyApp/latest/form/download/MyApp/",id,"/",c_Picture,".' height='100' width='100' align='middle' alt='",c_Desc,"'>","<br/>","<b>",c_AppName) AS AppName,

FROM app_fd_MyApp;

12 Oct, 2016
confluenceUser
confluenceUser

hi matthew king,

thanks for your answer, i'm to try this solution. 

06 Aug, 2020
confluenceUser
confluenceUser

Hi Matthew, I try the code but it still shows error Fail to retrieve column list. Please check your configuration.

06 Aug, 2020
confluenceUser
confluenceUser

Hi Zhen Jian Toh
Check out Image Datalist Formatter from Joget Marketplace.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print