Forum Discussion

AmyGosz1's avatar
AmyGosz1
Qrew Trainee
10 months ago

Open related file attachment from another app

I am building a new app to replace tables and processes in a current app. In the current app there is an attachment field for a picture that I would like to link to in the new app since moving attachments is not an efficient option. We will be migrating the record data over, so I can also migrate the Record ID from the current app. I'm thinking this would be needed in a formula URL so it know which Record ID from the current app is related to the new Record ID. However, I have spent a lot of time searching the community for a formula that works. I believe I'm really close but not sure where I'm going wrong.

current app table ID: bkszu32qd   

          field: 53 Picture (file attachment) or field 54: Thumbnail (formula rich text)

new app table ID: bs74pmxe2

          field: 58 Picture (file attachment)  or field 50: Thumbnail (formula rich text)

I would like a user to be able to click a button on a record in the new app that will open the related file attachment in the current app. Once the new app is live, attachments will be made directly in the new app so those records will not have a need for the button. Access to the current table would only be to view the related attachment.

Here is what I have for a formula in field 58 in the new app:

 var text textId = QB32Encode([Record ID#]);
"https://foodforthepoor.quickbase.com/up/bkszu32qd/g/r" & $textId & "/ede/va/" & [Picture]

Any help to get this working will be greatly appreciated!



------------------------------
Amy Gosz
------------------------------

5 Replies

  • Try this generic format for a clickable thumbnail which opens full screen.

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


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


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

    so translating to your app. 
    var text image= "<img src=" & "https://foodforthepoor.quickbase.com/up/bkszu32qd& "/a/r" & [Record ID# of the original app] & "/e53/v0' height='100' >";
    var text URL= "https://foodforthepoor.quickbase.com/up/bkszu32qd" & "/a/r" & [Record ID# from original app] & "/e53/v0' target=_blank";



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



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • ChayceDuncan's avatar
      ChayceDuncan
      Qrew Captain

      Make sure when you're doing the above that either 1) Users retain access to the original application or 2) you update the file attachment settings so that users can access the file/content without logging in otherwise the link will look right but users won't be able to actually get to the content due to security reasons. 



      ------------------------------
      Chayce Duncan
      ------------------------------
    • AmyGosz1's avatar
      AmyGosz1
      Qrew Trainee

      Hi Mark.....thanks for the quick response. I pasted the formula into my field and updated the Record ID field name, but the formula is showing an error in the 2nd 'var text URL'. What needs to be corrected on this? I attached a screenshot.



      ------------------------------
      Amy Gosz
      ------------------------------
      • Gary1's avatar
        Gary1
        Qrew Cadet

        The error is in the first variable. It's missing  a double quote after the table ID.

        var text image= "<img src=" & "https://foodforthepoor.quickbase.com/up/bkszu32qd" & "/a/r" & [Record ID# of the original app] & "/e53/v0' height='100' >";



        ------------------------------
        gary
        ------------------------------