Forum Discussion

GeorgeBramhall1's avatar
GeorgeBramhall1
Qrew Member
58 minutes ago

Trying to use a URL field in Rich Text formula field to display and image

What is wrong with this formula where the field in brackets is a URL field.

"<a href='" & "'><img src=\"[Photo Exterior Front from website]\"></a>"

As is, I am not getting an image but when I click on the url in the url field I do get an image.

 

1 Reply

  • Maybe try this

    "<a href=" & "<img src=" & [Photo Exterior Front from website] & "</a>"

    ... but I also offer some syntax below which I have used which should give you a clickable image, so that the initial display image can be set smaller, perhaps for a report and then you click the image to see the full size.

    In my example, the fid for the image is 12 and the field name for the file attachment field is [Team Member Picture]

    the 100 sets the height of the image, so you can try different heights.

    var text image= "<img src=" & URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e12/v0' height='100' >";
    var text URL= URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e12/v0' target=_blank";


    If([Team Member Picture]<>"", 
    "<a href=" & $URL & ">" & $Image & "</a>")