Forum Discussion

LisaHohneck's avatar
LisaHohneck
Qrew Member
3 years ago

Display file attachment in an embedded iframe on a form via code page

Hello evryone,

With the changes to javascript happening in August, do you have ideas how I can display the file attachment of a record as embedded iframe?


The formula URL for the attachment to display is


var Text jpg = URLRoot() & "db/" &Dbid()& "?a=er&dfid=11&rid="& [Record ID#]&"&z=" & URLRoot() & "db/" & Dbid()&"&ifv=1>";


var text UR = "https://docs.google.com/gview?url=" & 

  URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e24/v0"&URLEncode("?apptoken=XXX&usertoken=XXX");


Case(true, [Box - Google viewer]=true,  $UR,  $jpg)


When I click it, it opens in a new window. I would like to use a code page to display it as an embedded iframe. (As it is a native quickbase record I can't just use the iframe function in the formula URL field.)


So far I found this code 

<iframe src="[static URL]" style="width: 1000px; height: 1500px;"></iframe>  

which works fine for a static URL displaying as an embedded iframe, but I am struggling to past the dynamic URL from my formula URL field into the code page.


Anyone who has managed to embed Quickbase native record dynamically as iframe on a form via a code page?



------------------------------
Lisa Hohneck
------------------------------

1 Reply