Forum Discussion

JakeRattner1's avatar
Qrew Cadet
3 years ago

Use Pipeline to Remove an attachment from a field

Does anyone know how to remove/delete an attachment from a field using a pipeline?  I'm trying to use "update record" and am not seeing any option to remove an attachment. It looks like the attachment field isn't an update option in the "update record" UI.

What I'm trying to do is have the user upload an attachment.  The attachment gets added as a child record and then removed from the field where it was attached on the parent.


Jake Rattner

2 Replies

  • I know it can be done with an API call and a Pipeline can call an API. 
    Here is a partial pseudo example where fid 9 was a file attachment.


    So I think that you can do like this{{}}&_fid_9=&delfile_fid_9=1
    Method = POST

    I have not tested this though. Let us know if it works.

    Mark Shnier (YQC)
  • I know this is an old post but here is how make this happen.  I make a callable pipeline so I can use in any app/any table.  Below is the YAML after updating your URL/Usertoken you should be able to import to pipelines.  Then just call the pipeline with the variables.  Seems to work pretty good.  Versioning is a little wierd haven't figured it totally out but 1 file uploaded is not 0 like in the QB-UI, it is actually 1.

    # Purge File Attachments
    # Ust this to purge Files Attachments in any App/Table

    - META:
        name: Purge File Attachments
        description: Ust this to purge Files Attachments in any App/Table
        - EARP
        enabled: true
    - TRIGGER cloudpipes-meta pipeline on_called -> a:
          call_definition: PurgeFile(tbid,rid,fid,ver)
    - ACTION webhooks request make -> b:
          oauth_credentials_placement: header
          content_type: application/json
            name: 'QB-Realm-Hostname

            value: '

              QB-USER-TOKEN yourUSERTOKENhere'
          method: DELETE

    Sales Quickbase Account