Skip to main content
January 30, 2021
Question

How to display images in Record grid.

  • January 30, 2021
  • 4 replies
  • 0 views

I have uploaded multiple images in the document folder in my application using 'Upload File' option in the Action and Image Id of these images is stored in the database table.

Now I want to display these images in the record grid for which I am using the below method in the 'Edit List' feature of the List option of the record:

a!documentImage(

document: fv!row[recordType!Car.modeldetails.Image]

)

Where image is the name of column storing image IDs in the modeldetails database table.

But by executing this I am getting the below text as the result in place of image:

[@attributes=[@anyAttribute=[_cId:7ea9cd6ac69bf45fb67452fc4de3351f], @nil=], document=[Document:405304], caption=, altText=, link=, actions=, backgroundColor=, version=]

Please help me as I want images to be displayed in place of text (image details).

    4 replies

    dhananjayk
    January 31, 2021

    Hi Ayushi

    As you can see the definition of the document image, It must be used in a certain field.

    So for your case, you can use like below

    a!gridColumn(
    label: "Document Id",
    value: a!imageField(
    size:"GALLERY",
    images: a!documentImage(document: fv!row[recordType!Car.modeldetails.Image])),
    align: "END"
    ),

    ayushimAuthor
    January 31, 2021

    Thank You so much dhananjayk.

    The resolution provided by you worked for me.