Skip to main content
Question

thumbnail image formula

  • March 29, 2017
  • 0 replies
  • 250 views

So I have a field that shows a thumbnail preview of all images in 1 field.  However sometimes not all fields contain images, so quickbase leaves a blank, placeholder for it.  Is there any way I can alter this formula to not show the image if the attachment field is blank.  Im thinking an IsNull formula?

Also, is there any way of displaying the thumbnail, but clicking on it will open up the full size image?

Here is my formula:


"<img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e31/v0\" /> <img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e32/v0\" /><img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e33/v0\" />"

  • Quickbase Alumni
  • March 29, 2017
Put an IF statement on each of those formulas. Combined with a List function.
So if the file is blank, it shows nothing, otherwise it used the image.

List(" ",
If([File Attachment Field 1]="", "", "<img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e31/v0\" />"),
If([File Attachment Field 2]="", "", "<img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e32/v0\" />"),
If([File Attachment Field 3]="", "", "<img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e33/v0\" />")
)

  • Author
  • Quickbase Alumni
  • March 29, 2017
That worked nicely.  Thanks.  Is there any way of linking from the thumbnail to the original image?