Discussions

Expand all | Collapse all

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

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

    Posted 7 days ago

    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
    ------------------------------


  • 2.  RE: Display file attachment in an embedded iframe on a form via code page

    Posted 6 days ago
    Lisa, see if my responses here help

    https://community.quickbase.com/communities/community-home/digestviewer/viewthread?MessageKey=1162a5a3-58a2-4f15-af93-175f796d86f8&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer#bm1162a5a3-58a2-4f15-af93-175f796d86f8

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