Forum Discussion

FreddieSabbs's avatar
FreddieSabbs
Qrew Trainee
5 years ago

How to display a thumbnail image on a table report

One of my favorite tips learned at EMPOWER2020 was from a session Chris Hutchens delivered titled Building for Mobile.

He shared how to get a thumbnail image of a photo to display in a table report.  While the session was geared towards mobile users, it's applicable to anyone that wants to show an image in a table report.

I created a quick video to show demonstrate that little gem: https://youtu.be/M7p71Yo770c

If you'd like to try this in one of your apps, simply watch the video and copy this code snippet to paste into a formula - rich text field: 

If(Length([Photo])=0,"","<img width=\"150\" src=\""&URLRoot()&"up/"&Dbid()&"/a/r"&[Record ID#]&"/e31/v0\"/>")

Enjoy!

------------------------------
Freddie Sabbs
Senior Solutions Consultant
Quick Base
fsabbs@quickbase.com
Cambridge MA
------------------------------

7 Replies

  • Hey Freddie,

    I have images that are rotating 90 degrees on mobile - that are not rotating on mobile...  any advice on how to design for this?  I want users to navigate to the table and a default report...and I don't know if they are more likely to use mobile or desktop.

    ------------------------------
    Kevin O'Boyle
    ------------------------------
  • I have my photo attachment in the child tables. One parent record have multiple child record (each child has a photo attachment file).
    Is there a way to display a "concatenated" thumbnail from the child records onto the parent record? similar to having like a "combined text" via summary field.

    thanks

    Erikson Tsang

    ------------------------------
    Erikson Tsang
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      I have done this before but I don't have the code handy.

      The technique is to get the thumbnail code on the child record.  Have a mirror field that changes that field into a regular text field as that is the only field type which can be used in a combined text summary field.

      Once you have that string floated up to the parent, hen convert it back to a Rich text field by formula.

      You will also then want to use SearchAndReplace on that string to change the semi colon delimiters to a space.

      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      mark.shnier@gmail.com
      ------------------------------
  • Hey Freddie,

    Question for you. How do I get the field to display the current version of the file? For example, I have some photos that have been replaced since their original upload, but the thumbnail field still shows the original file? Weird! Any ideas?


    -jc

    ------------------------------
    SLMPAC Development
    ------------------------------
    • DavidLessin's avatar
      DavidLessin
      Qrew Member

      SLMPAC Development,

       

      Having spent over two hours on this in the past (deleting, replacing files, testing, blahh.). The 5 second fix is to clear your browsers cache!

       

      I included a screenshot of the formula field I used to display the attached file in a report (in this case, a country's flag).

       

       

      David Lessin

       

      Director

      +1 312 909 2721 mobile

       

      Information Services Group is a leading global technology research and advisory firm.

      Confidentiality note: The above email contains information that is confidential and/or privileged. The information is for the use of the individual or entity originally intended. If you are not the intended recipient, please contact the sender and delete the material from any computer. Please be aware that any disclosure, copying, distribution or use of this information is prohibited. Please consider the environment before printing this email or attachment.

       



      • MikeTamoush's avatar
        MikeTamoush
        Qrew Commander
        There was a discussion post about a month ago that talked about this caching issue. There have been a few solves for this, using new code (as opposed to constantly deleting cache).

        I don't have time to search and post the link, but if you search you can probably find it, or maybe someone else has the codes.

        ------------------------------
        Mike Tamoush
        ------------------------------