Skip to main content
Question

Photo Not Displaying in Record (form)

  • April 6, 2017
  • 0 replies
  • 145 views

I am uploading a single photo to a form (record) as a file attachment.  I have chosen to option to display the image (.jpg, .png) on the form, but it is not displaying.  It is showing the file name which is clickable to view the photo.  I would like the photo to display on the page though so the employee's picture shows with the rest of his record.  Help!
This topic has been closed for replies.

  • Quickbase Alumni
  • April 6, 2017
Create a new field, Formula-Text, and call it something like "Image"

Insert this formula with a few modifications:

If([Picture File]="","","<img height=\"80\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e41/v0\" />")

The changes you will need to make are the "e41", change that to the field id of your file attachment field...
"eXX"
I put a conditional If statement to make it blank if the file is empty, so change the field [Picture File] to your file attachment field.
You can also control the size/height of the image

Let us know if you get stuck.

  • Quickbase Alumni
  • April 6, 2017
Are you viewing or editing the record?  A link will display in edit, and the picture should show when viewing.

  • Quickbase Alumni
  • April 6, 2017
You can do this with two formula fields:
First create a formula text field with with this formula: 
"https://www.quickbase.com/up/";   & Dbid () 
  & "/a/r" 
  & [Record ID#] 
  & "/e6/v0?"
  & [employee image]

[employee image] is the file attachment field
Replace https://www.quickbase.com  with your domain name.
The 6 in e6 is the fid of the file attachment field

Then to display the image - create a second field 
This is also a formula text field with the allow some html box checked
"<img src=\""         
         &[image href]
         & " height=\"75\""
         & " width=\"75\""
         & "\"/>"

Where [image ref] is the first formula field
Good luck
Neil