Skip to main content
Question

Clickable Icon to File Attachment

  • August 10, 2020
  • 0 replies
  • 66 views

Does anyone have any example code for clicking an icon and having that go to a file attachment field? or bring up the image associated with that file attachment field?

------------------------------
Bob Salaj
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
The code is different to display an image vs open a file attachment.  Which do you want to do?   Can you explain your use case, that would help.

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

MarkShnierYou
Forum|alt.badge.img+24
try this
var text Image = "<img src=https://images.quickbase.com/si/32/113-note.png>";
var text URL = URLRoot() & "up/" & Dbid() &  "/a/r" & [Record ID#] & "/e130/v0"; 

If([PDF Document]<>"", "<a href=" & $URL & ">" & $Image & "</a>")

//  notes: replace the 130 with the fid of the file attachment field.
// There are 502 icons here in 5 convenient sizes if you want an easy source of icons open to everyone on the internet. https://login.quickbase.com/db/9kaw8phg?a=ShowPage&pageid=160

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