Forum Discussion

MelissaFreel's avatar
MelissaFreel
Qrew Member
4 months ago

Image Not Refershing

All,

I have built a rich text field that when clicked displays the record for the end user. I have loaded images up into an attachment field.  I have set the versions to "0" to always pull the most recent image, but it is not working. Can someone look at my rich text formula and see what I am doing wrong? (appp token hidden). 

var text pix = URLRoot() & "up/" & Dbid( )& "/a/r" & [Record ID#]  & "/e35/v0";

"<a href=" & URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#] & "&apptoken=&xxxxxxxxxxx" & URLEncode($pix) & "' height='100' target='_blank'><img src='" & $pix & "' height='100'/></a>"

I have attached a screen shot.  Image is the rich text field where the above is at and Picture is the file attachment and yes, my fied id for the file attachement is 35. 

Thoughts?

  • In all probability, there is nothing wrong with your formula. The issue is that Quickbase does automatic caching of images in the interest of performance.  But it's frustrating for users to have to wait like until the next day for the image to update.  :( 

    I believe that this link will defeat the caching as long as you change the file name when you do the next upload.  

     

    "<img src=" & URLRoot() & "up/" & Dbid()
    & "/g/r" & QB32Encode([Record ID#])
    & "/e" & QB32Encode(12) // 12 is the fid of the file attachment field
    & "/va/" & URLEncode([Picture]) // my file field is called [picture]
    & " width=30>"

    So if you make that your $pix variable it will probably work nd update the 12 and the [Picture] to match your own fields, it should work.

     

    • MelissaFreel's avatar
      MelissaFreel
      Qrew Member

      Thanks Mark, glad to hear my formula was correct and its more of a QB issue.  Thanks again!