image in table row

  • 1
  • Question
  • Updated 2 months ago
  • Answered
How can I get a thumbnail of a picture to show in a table? Here what i have now.
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb

Posted 2 months ago

  • 1
Photo of Gregg Baxter

Gregg Baxter, Official Rep

  • 3,080 Points 3k badge 2x thumb
Hi Bill, 

We have a new feature available in the upcoming Spark release that will allow you to use Avatars and the ability to load them with a url image or local image link. Coming soon! 
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
Thanks Greg.  When is that expected?  Is there a webinar introducing Spark?
Photo of Gregg Baxter

Gregg Baxter, Official Rep

  • 3,080 Points 3k badge 2x thumb
Hi Bill.

The exact release date is still to be announced and there will be a webinar. You will probably receive the emails but you can always keep a lookout on our website upcoming webinars section here: https://www.skuid.com/webinars-upcoming/

Thanks for your ongoing support!
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Bill,

Click on your table component, click the 'Add Field' drop down and add the 'Image' column to your table of Attachments.


 In the Image URL property for the Image column use the following:
/servlet/servlet.FileDownload?file={{Id}}


Make sure that you have the Id column selected in your model.



Thanks,

Bill
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
I tried this "/servlet/servlet.FileDownload?file={{Photo__r.Id}}" but it show nothing.
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Bill,

Try replacing {{Photo__r.Id}} with {{Photo__c}}

Thanks,

Bill
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
I tried this: /servlet/servlet.FileDownload?file={{Photo__c}}

Still no image.
Photo of Mike Dwyer

Mike Dwyer

  • 3,390 Points 3k badge 2x thumb
Bill, I have this working  in a test form.
The model Object Name is Attachment.
The field in the model is Id.
There is a condition on the model: ContentType = image/jpeg [Always On]
The table displays the model, with one column: 
  From the Add Fields dropdown, select Image
  The field properties look exactly like Bill McCullough's image above
When I preview the page, our photos appear like magic!

What I noticed in the dialog between the Bills is that McCullogh has /servlet/servlet.FileDownload?file={{Id}} in his URL. That is also what I have.  Your table shows Id's that are associated with the Attachment object, but I don't see where you tried {{Id}}. I only see {{Photo__r.Id}} and {{Photo__c}}. Have you tried the string that McCullogh provided?

Is there an issue with ContentType? I put the Condition in my page because the Image field was not displaying application/pdf documents.
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Bill,

Is the Photo__c field a lookup to the File__c object?  If so, try this:

/servlet/servlet.FileDownload?file={{Photo__r.skuid__AttachmentId__c}}

Make sure that you have selected the field in your model.

Thanks,

Bill
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
Yes!!!!!!!!!  That was it.  Awesome.  Thanks Bill