Forum Discussion

AmberPollard's avatar
AmberPollard
Qrew Assistant Captain
9 years ago

Use Field Icons I've Uploaded to a Related App

I've maxed the extent to which I can use the QuickBase icons, and now I want to be able to use other icons, so I've added an Icons table to my QB Admin app, which I want upload icons into and refer to them in other apps.

Do the icons need to be PNG files or will other filetypes work?

I'd like to be able to upload icons of a larger size and then tweak the referring field if I want the image to display as smaller.

What formula should I use in the Icons table to make the icon display?

What formula should I used for fields in related apps to make the icon display as a 16 x 16 image?

Thank you!
  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain

    Hi,

    Use this code as formula text, called [image preview] field with html enabled to capture the URL of the attachment file - or the image:

    "<img src="&URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e6/v0/" & [Image]&" width='120px' />"

    Above, [Image] is the file attachment field. Notice in the code, we have an HTML attribute of "width="120px".

    I hope this helps.


  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    Amber,

    It can be a png or jpg image.  

    And rather than creating an image preview field, then referencing that in your button, you can reference the direct URL, which might speed things up a little.


    Just modify the field properties of your file attachment field to be accessible without logging in, and now that file attachment is a permanent link for anybody to see/use


    Then you copy the URL into your 'a'frame.  Add your own action URL to the href, and size it as you'd like.

    "<a  href='#' title=\"Click Me\" >
    <img src=\"https://www.quickbase.com/up/bdvnw2gfi/g/rd/eh/va/busybee2.jpg\"; height=\"32\"></a>"
    • AmberPollard's avatar
      AmberPollard
      Qrew Assistant Captain
      I'm not using the image as a button, so I don't think I need to worry about an "a frame" or "action URL", correct?

      Is there a formula I can use for a field in another app that just references the Record ID -- or is this a less "speedy" solution than using the filename?

      Thanks!
    • MCFNeil's avatar
      MCFNeil
      Qrew Captain
      If you want to just display that image, and always have it be static, using the URL is best. 

      If you want the image to change and be dynamic based on some other field, you can make a conditional statement to display different images.

      But to be able to use the image in a completely different application that doesn't have a relationship, you will want to stick to the URL from the file attachment