Discussions

Expand all | Collapse all

Can a file attachment image thumbnail appear in a report?

Gena Fells-Curtis01-29-2013 18:33

_anom Diebolt)04-05-2013 20:46

Johnny QuickBase04-24-2015 20:01

Johnny QuickBase04-24-2015 20:38

  • 1.  Can a file attachment image thumbnail appear in a report?

    Posted 01-29-2013 01:18
    It would be nice if there is an option to display a thumbnail version of image file attachments. Is this possible?


  • 2.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 01-29-2013 01:52
    This formula will put up a thumbnail.
    //"https://www.quickbase.com/up/" & Dbid () & "/a/r" & //[Record ID#] & "/e6/v0\"height=\"1000\" width=\"1250\" target=_blank/> " &
    "<img src = https://gesco.quickbase.com/up/" & Dbid () & "/a/r" & [Record ID#] & "/e6/v0\" height=\"300\" width=\"375\" target=_blank />"

    note that e6 is the field ID # so change the 6 to whatever your file attachment field ID# is. eg e11 would be for fid 11.
    adjust the height and the width of the thumbnail.

    If you uncomment out the first two lines you would be able to click it to see a larger thumbnail, but it in neither case does it know how to scale the picture, so probably for full size undistorted viewing it would be best for your users to click on the file attachment file name if they want to see the thumbnail full size.

    Don't be adding this thumbnail to large reports and certainly not to the List All report as it takes forever to load when there are hundreds of records.


  • 3.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 01-29-2013 12:46
    Hi Mark,
    Thank you for this response!  I may be doing someting wrong.  I used the following from your formula:

    �<img src = https://tamarataylor.quickbase.com/up/"; &
    Dbid () & "/a/r" & [Record ID#] & "/e8/v0\" height=\"300\" width=\"375\" target=_blank />

    I used the new interface.
    I put this formula in a report (that has 14 rows).
    I created a calculated column in the report; with a field type of URL.

    The system is saying there is a syntax error of:  
         Formula syntax error
         A formula must be a valid expression.
               �<img src = https://tamarataylor.quickbase.com/up/"; &
               Dbid () & "/a/r" & [Record ID#] & "/e8/v0/" & height=/"300/" & width=/"375/" & target=_blank />


  • 4.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 01-29-2013 13:44
    Try adding a closing " quote.   I missed that in my copy and paste.


  • 5.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 01-29-2013 13:57
    It's still failing.

    Formula syntax error
    There are extra characters beyond the end of the formula.
    "<img src = https://tamarataylor.quickbase.com/up/";  ; &
     Dbid () & "/a/r" & [Record ID#] & "/e8/v0\" height=\"300\" width=\"375\" target=_blank />"


  • 6.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 01-29-2013 14:40
    "<img src=\"https://gesco.quickbase.com/up/"; & Dbid () & "/a/r" &
    [Record ID#] & "/e6/v0\" height=\"300\" width=\"375\" target=_blank />"

    The above is what is working for me. In your post above, I am seeing some semi colons just after the "up/"   Are they really there?  If so, they don't belong there.


  • 7.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 01-29-2013 14:47
    Hi Mark,
    I copied and pasted again - to make sure i didn't miss anything - and I am no longer receiving the error (hurdle 1 - accomplished).  :)
    Pasted formula is:

    //"https://www.quickbase.com/up/"; & Dbid () & "/a/r" &
    //[Record ID#] & "/e8/v0\"height=\"1000\" width=\"1250\" target=_blank/> " &
    "<img src = https://tamarataylor.quickbase.com/up/"; &
    Dbid () & "/a/r" & [Record ID#] & "/e8/v0\" height=\"300\" width=\"375\" target=_blank />"

    However, the image doesn't appear in the report.  The report shows a url instead.  When clicked, it takes me to the following url that doesn't resolve.  Example:

    http://%3cimg%20src%20=%20https//tamarataylor.quickbase.com/up/bhtkhxhbj/a/r1/e8/v0%22%20height=%22300%22%20width=%22375%22%20target=_blank%20/%3E

    It seems to be adding extraneous info in the beginning (http://%3cimg%20src%20=%20) and spacers in the end, Is there something additional I need to do?


  • 8.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 01-29-2013 15:06
    Click the checkbox on the field properties to enable HTML. :)


  • 9.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 01-29-2013 16:33
    :)  I was trying to do it as a calculated column in the report - and not an actual field.  

    I will work to add it as a field. :)  thanks for all of your assistance :)


  • 10.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 01-29-2013 18:33
    It works! thx.


  • 11.  RE: Can a file attachment image thumbnail appear in a report?

     
    Posted 04-05-2013 20:01
    Is it possible to do the same thing only for a video file instead?  Is there an html tag for embedding video?


  • 12.  RE: Can a file attachment image thumbnail appear in a report?

    Top
    Contributor
    Posted 04-05-2013 20:46
    Use the HTML5 <video> tag to embed a video.


  • 13.  RE: Can a file attachment image thumbnail appear in a report?

     
    Posted 04-05-2013 20:53
    I've been playing around with the <video> tag and can't seem to get it to work.  I was under the impression it was because the <video> tag was not supported.  Do you know for certain that this tag is supported?  Here's what the formula looks like:

    "<video src=https://intersystems.quickbase.com/up/"; & Dbid () & "/a/r" &
    [Record ID#] & "/e9/v0\" width=\"170\" height=\"85\" controls>\n<p>If you are reading this, it is because your browser does not support the HTML5 video element.</p>\n</video>"


  • 14.  RE: Can a file attachment image thumbnail appear in a report?

    Top
    Contributor
    Posted 09-11-2013 17:32
    Mark, I'm trying to get the thumbnail photo to enlarge as you mentioned will happen if the first 2 lines are uncommented. So this is what I have:

    "https://www.quickbase.com/up/"; & Dbid () & "/a/r" &
    [Record ID#] & "/e27/v0\"height=\"800\" width=\"1000\" target=_blank/> " &

    "<img src = https://gesco.quickbase.com/up/"; & Dbid () & "/a/r" &
    [Record ID#] & "/e27/v0\" height=\"200\" width=\"250\" target=_blank />"

    When displayed though it shows  "https://www.quickbase.com/up/biajkmurz/a/r4/e27/v0"height="800"; width="1000" target=_blank/>" to the left of the thumbnail photo.

    It appears that the top lines are missing an "<" but I tried putting it at the beginning and it still didn't work.
    Can you help?

    Thanks!
    Ryan


  • 15.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 09-11-2013 17:45
    yes, it look like my posted answer was missing the <a href part at the beginning.

    Here is one that works. I see that when I pasted it in, this forum lost some of my formula. Note that you will need to remove the extra spaces in the h r e f and the and w w w

    If you don't want a new window, then you leave out the target = blank.

    "<a h r e f=\"h t t ps://mycompany.quickbase.com/up/" & Dbid () & "/a/r" &
    [Record ID#] & "/e6/v0\"height=\"1000\" width=\"1250\" target=_blank/> " &
    "<img src=\"h t t p s://mycompany.quickbase.com/up/" & Dbid () & "/a/r" &
    [Record ID#] & "/e6/v0\" height=\"300\" width=\"375\" target=_blank />"

    Also since I made that formula I now realize that you should just specify a width or a height (but not both), and it will automatically scale the missing one. If you specify both, then it forces an aspect ratio distort the original photo.


  • 16.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 07-20-2017 18:07
    Hi ,
    I use your formulas for creating a field,thank you very much ,  It shows well in a report, but when I click on the image, the current firefox tab goes from report display to the current record display , and then it opens another tab where it shows the picture.
    What I don't like is the current tab behaviour . I don't want to see the view of the current record, I want to stay on the report page.
    Do you know  how I can accomplish this ?

    Thanks,
    Mihai


  • 17.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 07-20-2017 18:14
    The solution is to change the report to not allow to view the record. (uncheck the view box).

    But then you ask "but how do they view thew record?"

    Make a view button as a URL formula and make it be the first column on the report.  Label the button is just V to keep it short.

    urlroot() & "db/" & dbid() & "?a=dr&rid=" & [record ID#] 


  • 18.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 07-20-2017 19:58
    Thanks, it worked

    best regards,
    Mihai


  • 19.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 07-20-2017 20:06
    Yep, been there, done it, bought the T shirt :).  I was bit by that same problem.


  • 20.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 04-24-2015 20:01
    I can't find where I get the attachment ID


  • 21.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 04-24-2015 20:38
    nevermind


  • 22.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 04-27-2017 18:58
    /v0\ speaks to the version number. if you have something that may have iterations you will want to consider how best to approach it. I removed it from the coding, but it's probably not the best option. Is there a way to have it check the most recent version, like /v%\ or similar syntax?


  • 23.  RE: Can a file attachment image thumbnail appear in a report?

    Top
    Contributor
    Posted 04-27-2017 20:48
    v0 is the most recent version.  Odd I know.

    v1 is the most recently replaced.

    v3 would be the oldest available version if you allow up to 3 revisions, etc


  • 24.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 04-28-2017 13:10
    When I had it as v0 the image preview did not update when it was replaced with a new image (not even v1, but deleted and replaced completely). 


  • 25.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 04-28-2017 13:53
    It's an issue with cacheing in your browser settings.  I don't claim to b an expert and it will depend on the Browser you are using, but there will be a setting in their somewhere as to if the browser will chache content. They do that to speed up rendering on the screen, but the result is that it may render old data.

    If you are stuck, let me know which browser you are using and I will have a look at my similar settings.


  • 26.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 11-07-2017 16:43
    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 />


  • 27.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 11-07-2017 18:47
    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.


  • 28.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 03-20-2018 18:43
    It doesn't seem to be working for PDF attachments. Thoughts?


  • 29.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 03-20-2018 19:25
    Right, this is for image files like a jpeg.  There is no native PDF viewer in Quick Base at this time.


  • 30.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 09-18-2018 03:27
    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



  • 31.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 09-19-2018 12:52
    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.


  • 32.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 10-05-2018 14:06
    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!


  • 33.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 10-05-2018 15:01
    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?


  • 34.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 10-05-2018 15:11
    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!


  • 35.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 10-05-2018 15:27
    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?


  • 36.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 10-05-2018 15:32
    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. _ 


  • 37.  RE: Can a file attachment image thumbnail appear in a report?

    Posted 10-05-2018 15:44
    The point is that you will need to specify the Record ID of the images app, in the formula, so it knows which image to pull, so may as well select that off a relationship.