Forum Discussion

CarolMcconnell's avatar
CarolMcconnell
Qrew Officer
2 months ago
Solved

Delete file attachment after moving to sharepoint

I have a pipeline created to take a file attachment and move it to sharepoint and then update the quickbase record with url link.

I'm having a problem trying to get it to delete the file attachment in Quickbase after. 

What should be in the URL field, name field and value field?

  • MarkShnier__You's avatar
    MarkShnier__You
    2 months ago

    Yes it would be a Make Request.

    The URL would be like

    https://mycompany.quickbase.com/db/MyTableIdHere?act=API_EditRecord&rid=" &refer to the [Record ID#] of the trigger record &_fid_9=&delfile_fid_9=1

     

    ... replace the 9 with the fid of the file atatchment field.

    Then just select POST instead of GET.

8 Replies

  • Here's an example of the syntax to edit a record and delete a file attachment. 

     

    URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
    & "&_fid_9="
    & "&delfile_fid_9=1"
    // & "&apptoken=<your apptoken>"

     

    In a Pipeline you will need to hard code the actual URL.  Feel free to post back here if this does not get you unstuck

  • So, I'm using make request correct?  Should it be delete?  Also, is the only thing I'm changing in the above is the field id and app token?

    Are there any other fields in the make request that need to be completed?

    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      Yes it would be a Make Request.

      The URL would be like

      https://mycompany.quickbase.com/db/MyTableIdHere?act=API_EditRecord&rid=" &refer to the [Record ID#] of the trigger record &_fid_9=&delfile_fid_9=1

       

      ... replace the 9 with the fid of the file atatchment field.

      Then just select POST instead of GET.

      • CarolMcconnell's avatar
        CarolMcconnell
        Qrew Officer

        I'm getting this error:  I pulled the record id directly from the first step

        No such record; Sorry, there is no record in this application table with the record identifier (rid) of "0".; Error Code: 30; 

  • Never mind, I got it.  

    https://MYCompany.quickbase.com/db/MYTABLEID?act=API_EditRecord&rid={{a.id}}&delfile_fid_19=1&apptoken=MYTOKEN

  • @carol. You're getting confused between syntax in a formula field in Quickbase and syntax in a pipeline string. In a pipeline string, you do not use the & for concatenation.  you just run the elements together.

    Notice in my suggested format above I don't have any quotes or extra & characters.

    act=API_EditRecord&rid=" &refer to the [Record ID#] of the trigger record &_fid_9=&delfile_fid_9=1