Forum Discussion

GeoffreyHarmuth's avatar
GeoffreyHarmuth
Qrew Captain
8 years ago

thumbnail image formula

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\" />"

  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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\" />")
    )
  • That worked nicely.  Thanks.  Is there any way of linking from the thumbnail to the original image?
    • ChrisChris's avatar
      ChrisChris
      Qrew Assistant Captain

      List(" ",

      If([File Attachment Field 1]="","","<a href='"&URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e33/v0/" & [File Attachment field 1]&"'><img src="&URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e33/v0/" & [File Attachment field 1]&" width='120px' /></a>".....

      • Wallace__DHS_Ye's avatar
        Wallace__DHS_Ye
        Qrew Trainee
        I am trying to display an image based on the user that is selected, however I am only getting the url link code and not the image. Please find my formula below

        If(
        [Case Supervisor User]=ToUser("usersemail"), "<img src= https//octo.quickbase.com/up/bpwdnv4gj/g/rf/ep/va/MoffitSignature.PNG",
        [Case Supervisor User] =ToUser("usersemail") , "<img src= https//octo.quickbase.com/up/bpwdnv4gj/g/rg/ep/va/Mcnamara.PNG",
        [Case Supervisor User] =ToUser( "usersemail") , "<img src= https//octo.quickbase.com/up/bpwdnv4gj/g/rh/ep/va/Clark%20Signature.PNG", null)

        ------------------------------
        Wallace (DHS) Yeboah
        ------------------------------