Forum Discussion

GenaFells-Curti's avatar
GenaFells-Curti
Qrew Trainee
13 years ago

Can a file attachment image thumbnail appear in a report?

It would be nice if there is an option to display a thumbnail version of image file attachments. Is this possible?

36 Replies

  • Ok I am pretty confused, I have copied and pasted everything, re-read the thread 20 times and just trying to figure out why nothing is showing up. This is what I pasted into my Text Formula field:

    "<a href=\"https://xxxx.quickbase.com/up/"; & Dbid () & "/a/r" & 
    [Record ID#] & "/e8/v0\"height=\"1000\" target=_blank/> " & 
    "<img src=\"https://xxxx.quickbase.com/up/"; & Dbid () & "/a/r" & 
    [Record ID#] & "/e8/v0\" height=\"200\" target=_blank />
  • I can help but just to be clear what you are you trying to do?  Are you trying to just display an icon  and the user will click to then display a file attachment?

    Without putting much though into it yet, I see that there are semi colons in your formula in two places.  Can you try it by removing them and them post back your formula if that does not correct the problem.
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      Right, this is for image files like a jpeg.  There is no native PDF viewer in Quick Base at this time.
  • I answered my own question while typing this... seems like it would be worth sharing. 

    I figured out how to hide the empty img preview field from the form.

    Solution: 
    Form rule--> When (attachment field) Photo 1 > 0, show Img preview

    • hhersch's avatar
      hhersch
      Quickbase Staff
      Hi, Tim. You can also do this inside of the formula by encasing the entire thing in an IF and checking if the file is empty.
  • JoshCollins's avatar
    JoshCollins
    Qrew Assistant Captain
    Hey Mark, thank you for all the info on this thread.  I have everything working except one small issue: I am trying to pull the image from a different Quick Base application where I host all my images.  The images are the front image of house plans. I created a url field in App1 --> House Plan table that uses a url from App1 --> image that I want to use.  The App1 field opens the image fine if I click on the link, but if I reference the App1 field ID in the formula for the thumbnail image, I just get a blank image placeholder.

    My formula is:

    "<ahref=\"https://www.quickbase.com/up/"; & Dbid () & "/a/r" & [Record ID#] & "/e35/v0\"height=\"1000\" width=\"1250\" target=_blank/> " &"<img src = https://prespro.quickbase.com/up/"; & Dbid () & "/a/r" & [Record ID#] & "/e35/v0\" height=\"60\" width=\"75\" target=_blank />"

    Would you be able to help with this?

    Thank you!
  • I'm trying to better understand your question.  Are you saying that you have a formula which works when you click the link, but the thumbnail is not working?
    • JoshCollins's avatar
      JoshCollins
      Qrew Assistant Captain
      Sorry if my question was unclear.  I have 2 different fields:

      1) I have a basic URL field in App 1 where I manually add a URL for an image.  When I save then click that URL, the link works fine (in other words, a new tab opens and I see the image that I linked.)  The link I'm using happens to be out of a different Quick Base application where I store all the images I want to use, we'll call that "Images App."

      2) I have a Formula Rich Text field in App 1 where I use the code you provided to display a thumbnail image.  The reference field in the formula (E35) is the URL field from #1 above.

      I'm guessing that since the field in #1 above is referencing a URL, not a file attachment field, the formula in #2 field isn't pulling an image.

      My question is: Is there a way to pull the image that the URL field is reference?  If not, then is the only solution to upload the image via a file attachment field in App 1 rather than my dedicated "Images App"?

      Thanks!
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      You do not need to double load your images.  But you will need to replace the dbid() with the table "code" in the other app.  and you will need to replace Record ID with the record ID of the record that holds the image in the other app.

      But before I go into the suggestion of the code, why not just make a relationship back to your images table and pull the image formula down as a lookup field?
    • JoshCollins's avatar
      JoshCollins
      Qrew Assistant Captain
      Re the relationship: I'm sure that will work.  I'm not super adept at relationships from other applications though.  I'll give it a shot and probably ask some questions in the process. _