Skip to main content
Solved

Document Template - Images

  • October 7, 2025
  • 0 replies
  • 227 views

Forum|alt.badge.img+4

Good Afternoon,

How do I get an image to display in a document template?  Right now all I'm getting is the file name in text. 

Please see attachments for current document template set up and result.

Best answer by Denin

Create a new rich text formula field. Then use this formula:

//Where it says e50, change the 50 to your attachment field ID
var text url = URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e50/v0";

//Change to your file attachment field
var text img = If(
    [File Attachement] <> "",
    "<img src='" & $url & "' />\n",
    ""
);

$img

Make the minor changes per the comments in the formula. Now use the formula in the document template instead of the file attachment field directly. If you need to customize height/width of image, it can be done too by editing the HTML in the formula.

Forum|alt.badge.img+11
  • Registered
  • Answer
  • October 7, 2025

Create a new rich text formula field. Then use this formula:

//Where it says e50, change the 50 to your attachment field ID
var text url = URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e50/v0";

//Change to your file attachment field
var text img = If(
    [File Attachement] <> "",
    "<img src='" & $url & "' />\n",
    ""
);

$img

Make the minor changes per the comments in the formula. Now use the formula in the document template instead of the file attachment field directly. If you need to customize height/width of image, it can be done too by editing the HTML in the formula.