Forum Discussion

Re: Button to download attachments from a separate app

Hi Mark,

Here's the code but it is saying Site can't be reached.

// Procurement document name (Formula Rich Text)
var text Words = [Procurement Document];

// dbid is from the Procurement Manager App, Procurements table. PM Related Record ID# is from Procurement Manager App, Procurements table.

var text URL = URLRoot() & "up/" & "_DBID_PROCUREMENTS" & "/a/r" & [PM Related Record ID#] & "/e12/v0";

"<a href=" & $URL & ">" & $Words & "</a>"

------------------------------
Tim Egerton
------------------------------

7 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Icon for Qrew Legend rankQrew Legend
    Two issues.

    Replace the bq5m8kxxx with the similar looking characters form the URL from the Procurements table.  It will be the string you see in the URL after the db/

    Also is your field that holds the file attachment field ID#12?  if not change to 12 to the correct field ID that holds the attachment.


    var text URL = URLRoot() & "up/" & "bq5m8kxxx" & "/a/r" & [PM Related Record ID#] & "/e12/v0";

    "<a href=" & $URL & ">" & $Words & "</a>"

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • TimEgerton's avatar
      TimEgerton
      Qrew Trainee
      Hi Mark,

      It still can't find the site.

      // Procurement document name (Formula Rich Text) in Portal app. Created by pipeline.
      var text Words = [Procurement Document];

      // bskpdh396 is from the Procurement Manager app, Procurements table. PM Related Record ID# is from Procurement Manager app, Procurements table (created in Portal by pipeline) e27 is attachment field in Procurement Manager app.

      var text URL = URLRoot() & "up/" & "bskpdh396" & "/a/r" & [PM Related Record ID#] & "/e27/v0";

      "<a href=" & $URL & ">" & $Words & "</a>"

      ------------------------------
      Tim Egerton
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        For the record you are testing on, is there a valid value in the field

        [PM Related Record ID#]

        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------